|
|
|
|
|
- Strings, Buffer and Unicode
CommonLength (Function) In french: TailleCommune Returns the number of common characters between two strings (from the beginning or from the end of the string).
CommonLength("ABCDE", "ABXYZ")
CommonLength("VWXYZ", "ABXYZ", FromEnd)
CommonLength("New York", "New Yorker")
CommonLength("New York", "New York City", WholeWord)
CommonLength("ABCDE", "ABCdE")
CommonLength("ABCDE", "ABCdE", IgnoreCase)
Syntax
<Result> = CommonLength(<String1> , <String2> [, <Options>])
<Result>: Integer Length of the common characters between the strings. <String1>: Character string String to compare. <String2>: Character string String to compare. <Options>: Optional integer constant Indicates the comparison options: | | FromBeginning | Compares from the beginning of the strings | FromEnd | Compares from the end of the strings | IgnoreCase | Compares while ignoring the case | WholeWord | Compares whole words |
These constants can be combined.By default, the comparison is performed from the beginning of the string, character by character, by taking the case into account. Remarks Strings, Buffer and Unicode The function CommonLength FUNCTION function works on buffers, strings and Unicode strings. Attention: Constants SansCasse and MotComplet are ignored on buffers. You have the ability to use ANSI strings, Unicode strings and buffers in the different parameters of the function. The following conversion rule is used for the Ansi systems (Windows or Linux): - If at least one of the strings is a buffer, all the strings are converted to buffers and the operation is performed with buffers.
- If the first condition is not met and there is at least one Unicode string, all the strings are converted to Unicode and the operation is performed in Unicode (the conversion is performed with the current character set, if necessary).
- Otherwise, the operation is performed in Ansi.
The conversion rule used for Unicode systems is as follows: - If at least one of the strings is a buffer, all the strings are converted to buffers and the operation is performed with buffers.
- Otherwise, the operation is performed in Unicode.
Reminder: The language parameters used are defined when the ChangeCharset function is called. Business / UI classification: Neutral code
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|