TrimEnd for byte[]

Is there any way to trim certain whitespaces at the end of the byte[]?
ssdjgru1Asked:
Who is Participating?
 
prakash_prkConnect With a Mentor Commented:
Try this .

byte[] by;
string sd=System.Text.Encoding.UTF8.GetString(by);
sd=sd.TrimEnd(" ");//Chars you want to trim
by=System.Text.Encoding.UTF8.GetBytes(sd);

Regrads
Prakash

0
All Courses

From novice to tech pro — start learning today.