Hello!
I want to generate a new string variable from an old string variable that consists of everything except the last letter.
Consider the following example where I want to generate a new variable where the word is in singular instead of plural.
string1 | string2
balls | ball
tables | table
rings | ring
How do I go from string1 to string2?
I have tried substr(), but it haven't been able to make it work since it doesn't count backwards, or does it?
Shikasta
I want to generate a new string variable from an old string variable that consists of everything except the last letter.
Consider the following example where I want to generate a new variable where the word is in singular instead of plural.
string1 | string2
balls | ball
tables | table
rings | ring
How do I go from string1 to string2?
I have tried substr(), but it haven't been able to make it work since it doesn't count backwards, or does it?
Shikasta
Comment