Results 1 to 3 of 3

Thread: Right Trim?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2005
    Posts
    261

    Right Trim?

    I have a value that I read in as DRS332 the field is always 6 characters wide. how do I Right trim so that I only get the 3 left characters?

  2. #2
    Smitten by reality Harsh Gupta's Avatar
    Join Date
    Feb 2005
    Posts
    2,938

    Re: Right Trim?

    Using String.SubString() function:
    VB Code:
    1. string str = "DRS332";
    2. MessageBox.Show(str.Substring(0,3));
    Show Appreciation. Rate Posts.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2005
    Posts
    261

    Re: Right Trim?

    thanks, that did it!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width