Solved

TrimEnd for byte[]

Posted on 2004-10-24
193 Views
Last Modified: 2010-04-15
Is there any way to trim certain whitespaces at the end of the byte[]?
0
Question by:ssdjgru1
    1 Comment
     
    LVL 10

    Accepted Solution

    by:
    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

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Suggested Solutions

    Introduction                                                 Was the var keyword really only brought out to shorten your syntax? Or have the VB language guys got their way in C#? What type of variable is it? All will be revealed.   Also called…
    Article by: Ivo
    C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
    With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…
    Want to pick and choose which updates you receive? Feel free to check out this quick video on how to manage your email notifications.

    884 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now