Difference between revisions of "Implementation of SUBSTR() command"

From ArcoWiki
Jump to: navigation, search
(Created page with ": this is a standard DMIS 5.2 command able to extract a substring from a string.<br /> The command is:<br /> SUBSTR(str,x var_8) <br /> Where: str: is the string to be...")
 
Line 1: Line 1:
: this is a standard [[DMIS]] 5.2 command able to extract a substring from a string.<br />
+
This is a standard [[DMIS]] 5.2 command able to extract a substring from a string.<br />
The command is:<br />
 
SUBSTR(str,x var_8)
 
<br />
 
Where:
 
str: is the string to be tested
 
x: is the position where to start
 
y: is the position where to stop (this is an optional parameter, if missing the string is extracted to the end)<br />
 
 
An example of use is:<br />
 
  
DECL/CHAR,100,str1,str2
+
See [[Reading a Substring from a variable]] for the use of this capability.
str1=[[Assign|ASSIGN]]/'My full String'
 
$$reading the string from char #4 to char #7
 
str2=[[Assign|ASSIGN]]/SUBSTR(str1,4,7)
 
  
 
[[Category:ReadMe3.4.155]]
 
[[Category:ReadMe3.4.155]]

Revision as of 20:28, 10 September 2016

This is a standard DMIS 5.2 command able to extract a substring from a string.

See Reading a Substring from a variable for the use of this capability.