Substr

From SDU
Revision as of 06:36, 3 September 2008 by Bredding (Talk | contribs) (New page: Overloaded method to return s string within a string string substr(string str, int start, int finish) string substr(string str, int start) // reads to the end of the string for finish Ca...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Overloaded method to return s string within a string

string substr(string str, int start, int finish) string substr(string str, int start) // reads to the end of the string for finish

Can be used in conjuction with sindex to retrieve start index.

eg.

string myString; string otherString;

otherString = "this is a string"; myString = substr(otherString,sindex(otherString,"a")); // myString = "a string"