|
|
|
|
|
- Miscellaneous
- <ANSI string>.Complete and UNICODE
<ANSI string>.Complete (Function) In french: <Chaîne ANSI>.Complète Returns a character string of a specified length. This string can be truncated or padded with spaces (or any other character) to reach the specified length.
MyString is string
MyString = "Alan"
MyString.Complete(8)
MyString.Complete(8, "A")
MyString = "Alexander"
MyString.Complete(4)
Syntax
<Result> = <String to use>.Complete(<Length> [, <Character>])
<Result>: Character string Character string of the specified length, padded or truncated.- If the length of <String to use> is less than <Length>, the string is padded on the right with spaces or with characters if the <Character> parameter is specified.
- If the length of <String to use> is greater than <Length>, the string is truncated on the right (equivalent to Left).
<String to use>: ANSI character string String to be padded or truncated. This character string is not modified. <Length>: Integer New length of the character string (greater than or equal to 0). <Character>: Optional character Character that will be used to pad the string. By default, this character corresponds to a space. Remarks Miscellaneous - A WLanguage error occurs if <Length> is less than 0.
- The index of a string starts from 1.
<ANSI string>.Complete and UNICODE <String to use> and <Character> can be both: - or ANSI format.
- in Unicode format.
- 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.
Remember: the language parameters used are defined when the ChangeCharset function is called. Business / UI classification: Neutral code
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|