Difference between revisions of "SUBSTR()"
From Recital Documentation Wiki
		
		
		
Yvonnemilne  (Talk | contribs)  | 
				Yvonnemilne  (Talk | contribs)   | 
				||
| Line 12: | Line 12: | ||
==See Also==  | ==See Also==  | ||
| − | [[AT()]], [[ATNEXT()]], [[INLIST()]], [[LEFT()]], [[OCCURS()]], [[RAT()]], [[RIGHT()]], [[STR()]], [[STREXTRACT()]], [[STRTRAN()]], [[STUFF()]]  | + | [[AT()]], [[ATNEXT()]], [[INLIST()]], [[LEFT()]], [[OCCURS()]], [[RAT()]], [[RIGHT()]], [[STR()]], [[STREXTRACT()]], [[STRSTR()]], [[STRTRAN()]], [[STUFF()]]  | 
| Line 28: | Line 28: | ||
==Products==  | ==Products==  | ||
| − | Recital   | + | Recital Server, Recital  | 
[[Category:Documentation]]  | [[Category:Documentation]]  | ||
[[Category:Functions]]  | [[Category:Functions]]  | ||
[[Category:String Data]]  | [[Category:String Data]]  | ||
[[Category:String Data Functions]]  | [[Category:String Data Functions]]  | ||
Revision as of 13:35, 13 October 2009
Class
String Data
Purpose
Function to perform substring extraction
Syntax
SUBSTR(<expC> | <memofield>, <expN1> [,<expN2>])
See Also
AT(), ATNEXT(), INLIST(), LEFT(), OCCURS(), RAT(), RIGHT(), STR(), STREXTRACT(), STRSTR(), STRTRAN(), STUFF()
Description
The SUBSTR() function extracts a substring from <expC> or <memofield> starting at position <expN1> of width <expN2>. If <expN1> is negative, the extraction starts from the right side of the string. If <expN2> is omitted, a substring will be extracted up to the end of <expC>. When used in conjunction with the AT() function, the SUBSTR() function is very useful for extracting selected information from character strings.
Example
m_usrname = "GTW , Gary T West " ? substr(m->m_usrname,at(",",m->m_usrname)+1) Gary T West
Products
Recital Server, Recital