|
|
|
|
|
Contains (Function) In french: Contient Allows you to check if a substring is within a string.
sMaChaîne is string = "Antananarivo"
IF Contains(sMaChaîne, "NA") = False THEN
Info("Cette chaîne ne contient pas la syllabe NA")
END
tabChaine is array of strings = ["WINDEV","WEBDEV"]
sTest is string = "WEBDEV 28"
IF Contains(sTest, tabChaine) THEN
Info("Cette chaîne contient WINDEV ou WEBDEV")
END
Syntax
Checking if a string contains a substring Hide the details
<Result> = Contains(<String to analyze> , <Substring> [, <Options>])
<Result>: Boolean - True if the string contains a substring.
- False otherwise.
<String to analyze>: ANSI, Unicode or Binary string Character string to use. <Substring>: ANSI, Unicode or Binary string Search substring. <Options>: Integer constant Sub-string search mode:
| | IgnoreCase | Case and accent insensitive search (ignores uppercase/lowercase differences). | WholeWord | Searches for a whole word (between punctuation characters or spaces). |
By default, the search is case-sensitive and takes into account all specified strings (even if they are part of a word).
Checking if a string contains one of the strings in an array Hide the details
<Result> = Contains(<String to analyze> , <Array of search strings> [, <Options>])
<Result>: Boolean - True if the string contains one of the strings in the array.
- False otherwise.
<String to analyze>: ANSI, Unicode or Binary string Character string to use. <Array of search strings>: Array Name of the array containing the search strings. <Options>: Integer constant Sub-string search mode:
| | IgnoreCase | Case and accent insensitive search (ignores uppercase/lowercase differences). | WholeWord | Searches for a whole word (between punctuation characters or spaces). |
By default, the search is case-sensitive and takes into account all specified strings (even if they are part of a word).
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|