Stringreplace - Siemens SINUMERIK 840D sl Operating Manual

Integrate create myconfig - diff, expert, topo
Hide thumbs Also See for SINUMERIK 840D sl:
Table of Contents

Advertisement

Create MyConfig - Expert
4.6 Script language
Example
Up.Pos=StringPos("Ingenuity for life", "e", 0)
Up.Pos=StringPos("Ingenuity for life", "E", 5)
Up.Pos=StringPos("Ingenuity for life", "e", 25)
Up.Pos=StringPos("Ingenuity for life", "x", 0)
Up.Pos=StringPos("Ingenuity for life", "for", 0)
Up.Pos=StringPos("Ingenuity for life", "[efg]", 0) ;Up.Pos = 2
4.6.8.4

StringReplace

StringReplace("<string>", "<search>", "<replace>")
The StringReplace() function searches in the <string> character string for the
<search> character string and replaces it with the <replace> character string.
The function return value is a "string" character string with the replaced characters.
The <search> character string to be sought is specified via a regular expression.
The case-sensitivity in the <search> argument is relevant and is observed. Replacement is
made only when identical. If nothing to be replaced is found, the function returns the
<string> argument unchanged.
Multiple occurrences of the sought <search> characters are all replaced.
Note
Compatibility
The function name has been changed from Replace() to StringReplace().
For compatibility reasons, the Replace() function name is still tolerated in this CMC version.
Replace() will no longer be supported in subsequent CMC versions.
Only use the StringReplace() function. Change all earlier calls to this new function name.
Note
Using metacharacters as character literals
Take special care when using metacharacters as character literals in a regular expression.
Further information on regular expressions can be found at Create MyConfig - Diff, Section
"Use of regular expressions in Diff (Page 115)".
292
SINUMERIK Integrate Create MyConfig - Diff, Expert, Topo
Operating Manual, 12/2017, A5E36537479B-AE
;Up.Pos = 3
;Up.Pos = 17
;Up.Pos = -1
;Up.Pos = -1
;Up.Pos = 10

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 828d

Table of Contents