Im trying to have my application read only a certain amount of characters from a string. So lets say 'str' is 5 characters long, and I only want to read the last 2.
This would return the left two characters of the old string:
newstring = left(oldstring, 2)
This would return the right two characters of the old string:
newstring = right(oldstring, 2)
This would allow you to start somewhere other than the left or right. For instance, the one below will start at character #2 and read 3 characters to the right of it.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.