OScript String Manipulation
I am reviewing some code and have come across the following option for a subset of a string: mystring[:-4]
If mystring is 'abcdef', then what is returned with mystring[:-4]?
I understand if I use mystring[1:4] it will return 'abcd' or if I use mystring[-4:-2] it will return 'cd'.
So, what happens when you leave off the first parameter? Is there documentation for OScript string manipulation?
Thanks in advance.
Comments
-
Hi Fred - here's a good place to learn more: https://knowledge.opentext.com/knowledge/cs.dll/fetch/-15106263/15106294/15106295/16376487/67794710/67790529/documentation/string.html
Additionally: have a look @ signing up for the CSIDE course ( https://www.opentext.com/training/coursedetails.html?id=2807 ). It's not often offered, however when it is it's a fantastic option to learn the OScript language & CS inner workings.
@siegel: vi is an editor with two modes: one which destroys your input and the other which beeps at you
2 -
cross-posted by OP here https://forums.opentext.com/forums/discussion/297846/oscript-string-manipulation#latest
1
Categories
- All Categories
- 107 Developer Announcements
- 53 Articles
- 105 General Questions
- 141 IM Services
- 43 OpenText Hackathon
- 32 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 898 Cloud Fax and Notifications
- 76 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 118 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management