|
FRM v1.4.2 |
||||||||
| PREV SCRIPT NEXT SCRIPT | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | FUNCT | DETAIL: FIELD | CONSTR | FUNCT | ||||||||
CompiledModule | +--emos_std_string_lib
This library contains some useful string manipulation routines.
| Function Summary | |
String |
alltrim(in str1)
|
String |
arr2str(inout[] arr,
in sep,
in count,
in start)
This functions concatenates all elements of the array |
String |
index1(in s1,
in s2)
|
String |
index2(in s1,
in s2,
in n1)
|
String |
join_path(in part1,
in part2,
in sep)
Diese Funktion fügt zwei Pfadteile zusammen. |
String |
ltrim(in str1)
|
String |
random_arr(inout[] arr1,
in nnn)
|
String |
replace(in str,
in delchr,
in insstr)
Replaces all delchr characters with insstr string.
|
String |
replace1(in s1,
in s2,
in s3)
|
String |
split_path(in path,
out dir,
out file,
in sep)
Splits a path string into a directory and file parts. |
String |
split1(in s1,
inout[] arr1,
in s2)
|
String |
strip_both(in str,
in zap)
Removes all occuences of zap from both sides of str (trim). |
String |
strip_front(in str,
in zap)
Removes all occuences of zap from the front of str (left trim). |
String |
strip_trail(in str,
in zap)
Removes all occuences of zap from the end of str (right trim). |
String |
substr1(in str1,
in s1,
in s2)
|
protected String |
test_replace()
|
String |
trim(in str1)
|
String |
yyyymmdd_str(in time)
Converts the integer returned by the get_time function to a string formatted as YYYYMMDD. |
| Function Detail |
public String arr2str(inout[] arr,
in sep,
in count,
in start)
sep.
NOTE!
Iy the arr is not sequentially inexed (starting from 0), then either the
count should NOT be defined (in operator will be used) or start must
be defined (sequential from then on).
sep - (in) (optional) separator, [default: comma]count - (in) (optional) number of elements in the array [default: 0]start - (in) (optional) starting index [default: 0]
public String replace(in str,
in delchr,
in insstr)
delchr characters with insstr string.
NOTE1! This function internally uses split() to process the string. Unfortunatelly, split() has an undocumented "feature" that it trims blanks from the given string before splitting. This has the effect that replace() does the same. If you don't want the string to be trimmed, use replace1().
NOTE2!
The replace() replaces each occurence of individual characters within
delchr with the complete string insstr. It does NOT replace string
delchr with the string insstr.
str - (in) string to be processeddelchr - (in) character(s) to be replacedinsstr - (in) string to be used as replacement
protected String test_replace()
public String strip_trail(in str,
in zap)
zap from the end of str (right trim).
str - (in) string to be processedzap - (in) (optional) string to be removed [default: " "]
public String strip_front(in str,
in zap)
zap from the front of str (left trim).
str - (in) string to be processedzap - (in) (optional) string to be removed [default: " "]
public String strip_both(in str,
in zap)
zap from both sides of str (trim).
str - (in) string to be processedzap - (in) (optional) string to be removed [default: " "]
public String split_path(in path,
out dir,
out file,
in sep)
path string into a directory and file parts. The path
separator can be defined with sep (default: backslash)
NOTE!
The function does not analyse whether the
file part is indeed a file name.
Anything following the last file. Anything before is
treated as dir.
NOTE2!
dir does not end with sep.
path - (in) string to be processeddir - (out) directory-part (up until the last sep)file - (out) name-part (anything after the last sep)sep - (in) (optional) separator (default: backslash)
public String join_path(in part1,
in part2,
in sep)
sep konvertiert
"/-->\ bzw. \-->/). Standardmeßig werden \ durch / ersetzt.
Eventuell nicht oder merfach vorhandene Separatoren in der Join-Stelle
werden auf ein EXAMPLE:
join_path( "C:\aaa", "bbb.xxx" ) ==> "C:/aaa/bbb.xxx" join_path( "C:\aaa\", "\bbb.xxx" ) ==> "C:/aaa/bbb.xxx" join_path( "", "bbb.xxx" ) ==> "/bbb.xxx" join_path( "C:/aaa" ) ==> "C:/aaa/"
part1 - (in) erster Teil der Pfadangabepart2 - (in) zweiter Teil der Pfadangabesep - (in) (optional) Pathseparator to use [default: /]
public String trim(in str1)
public String ltrim(in str1)
public String alltrim(in str1)
public String random_arr(inout[] arr1,
in nnn)
public String replace1(in s1,
in s2,
in s3)
public String substr1(in str1,
in s1,
in s2)
public String index1(in s1,
in s2)
public String index2(in s1,
in s2,
in n1)
public String split1(in s1,
inout[] arr1,
in s2)
public String yyyymmdd_str(in time)
time - (in) [optional] integer returned by get_time() or any other integer that is interpreted
as number of seconds passes since 1.Jan.1970. [default: today]
|
FRM v1.4.2 |
||||||||
| PREV SCRIPT NEXT SCRIPT | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | FUNCT | DETAIL: FIELD | CONSTR | FUNCT | ||||||||