Last active
August 14, 2020 15:12
-
-
Save kbens/10470609 to your computer and use it in GitHub Desktop.
String Manipulation in PeopleCode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Local string &foo = "This is a foo string."; | |
Local string &start_key = "Th"; | |
Local string &end_key = "."; | |
Local integer &start_pos = Find(&start_key, &foo) + Len(&start_key); | |
Local integer &end_pos = Find(&end_key, &foo); | |
Local string &result = Substring(&foo, &start_pos, &end_pos - &start_pos); | |
/* &result will now equal "is is a foo string" */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment