Results 1 to 4 of 4

Thread: String manipulation

  1. #1

    Thread Starter
    Hyperactive Member maxl's Avatar
    Join Date
    Jan 2002
    Location
    Montréal
    Posts
    384

    String manipulation

    I've got a string in wich I need to get rid of the last character only if it's a "C" and the string is of variable lenght anybody can help? thanks
    COBOL sa suce !!!

  2. #2
    jim mcnamara
    Guest
    Code:
    if right(mystring,1) = "C" then
           mystring = left( mystring,Len(mystring))
    end if

  3. #3
    Frenzied Member
    Join Date
    Jan 2000
    Location
    Brooklyn NY USA
    Posts
    1,258
    VB Code:
    1. if right(mystring,1) = "C" then
    2.        mystring = left( mystring,Len(mystring)-1)
    3. end if

    You forgot the -1

  4. #4
    Lively Member
    Join Date
    Mar 2002
    Location
    Warrington, England
    Posts
    70
    Think you missed the -1 off the end
    Its not a bug
    Its a undocumented feature !

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