on 08-18-2017 2:54 PM
the Trim function removes empty spaces on both sides of the string.
depending on what you need to do, you may be able to split on the - character and then read the left side (index 0) or the right side (index 1)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I do not think you understand how trim works... it is not a "Replace" or a "Remove" from anywhere in the string
Trim left removes the char from the left only (right is the same only right)
Trim("-") would only remove the "-" from the left and the right not the middle
Trim on its own only removes " " spaces from the left and right as sergio mentioned.. so
If you are looking to Remove the "-" try
.Replace("-","")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the clarification Gast,
I misunderstood the trim left would remove all the characters before "-" like,
input : "117-25"
trim left output: "25"
trim right output: "117"
So I used findPosition and SubString function to get the above results. Is there any other function to get the desired result?
Regards,
Senthil
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.