Results 1 to 5 of 5

Thread: Trimming Problem

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 1999
    Posts
    81
    When you do the following It will not trim advice would be appricated


    DIM PROBLEM AS STRING * 50

    PROBLEM = "PROD"
    PROBLEM = RTrim(Mid(PROBLEM , 1, InStr(1, PROBLEM , " ") - 1))

    FOR SOME REASON IT DOES NOT SEE THE SPACES BEHIND PROD. IF I ADD A CHAR TO THE STRING LIKE "^" AND LOOK FOR IT, IT WORKS FINE...


    Thanks For the help

    Brooke
    -------------------------
    There is never only one right answer. That is the magic of programming.
    -------------------------

  2. #2
    Fanatic Member
    Join Date
    Mar 2000
    Location
    That posh bit of England known as Buckinghamshire
    Posts
    658
    You have declared your string as a fixed length string.

    This means that whatever value you put into the variable will be padded out with spaces. So that the number of characters equals the size of the string.
    Iain, thats with an i by the way!

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jan 1999
    Posts
    81

    I know that

    to pull from an ini file i must have a buffer to throw the values in... Is there anyway to retrieve the text in the buffer with out putting in stop values?
    -------------------------
    There is never only one right answer. That is the magic of programming.
    -------------------------

  4. #4

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Jan 1999
    Posts
    81

    Cool

    So you haft to throw into a padded string before it can be trimmed... Thanks didn't know that...

    -------------------------
    There is never only one right answer. That is the magic of programming.
    -------------------------

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