Difference between revisions of "STRSTR()"

From Recital Documentation Wiki
Jump to: navigation, search
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{YLM to do}}
 
==Class==
 
String Data
 
 
 
 
==Purpose==
 
==Purpose==
 
Function to perform substring extraction
 
Function to perform substring extraction
Line 13: Line 8:
  
 
==See Also==
 
==See Also==
[[AT()]], [[ATNEXT()]], [[INLIST()]], [[LEFT()]], [[OCCURS()]], [[RAT()]], [[RIGHT()]], [[STR()]], [[STREXTRACT()]], [[STRTRAN()]], [[STUFF()]], [[SUBSTR()]]
+
[[AT()]], [[ATNEXT()]], [[INLIST()]], [[LEFT()]], [[OCCURS()]], [[RAT()]], [[RIGHT()]], [[SET STRESCAPE]], [[STR()]], [[STREXTRACT()]], [[STRTRAN()]], [[STUFF()]], [[SUBSTR()]]
  
  
Line 22: Line 17:
 
==Example==
 
==Example==
 
<code lang="recital">
 
<code lang="recital">
m_usrname = "GTW, Gary T West"
+
? "Release information: " + strstr(version(2),"Released")
? substr(m->m_usrname,at(",",m->m_usrname)+1)
+
Gary T West
+
 
</code>
 
</code>
  

Latest revision as of 14:24, 21 July 2010

Purpose

Function to perform substring extraction


Syntax

STRSTR(<expC1>, <expC2>)


See Also

AT(), ATNEXT(), INLIST(), LEFT(), OCCURS(), RAT(), RIGHT(), SET STRESCAPE, STR(), STREXTRACT(), STRTRAN(), STUFF(), SUBSTR()


Description

The STRSTR() function returns a substring from <expC1> starting from <expC2> to the end of <expC1>. If <expC2> is not found, an empty string is returned.


Example

? "Release information: " + strstr(version(2),"Released")


Products

Recital Server, Recital