PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Various
  • Complete and UNICODE
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
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.
Versions 18 and later
Universal Windows 10 App This function is now available in Windows Store apps mode.
New in version 18
Universal Windows 10 App This function is now available in Windows Store apps mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Example
Complete("Alan", 8)        // Returns "Alan    "
Complete("Alan", 8, "A")   // Returns "AlanAAAA"
Complete("Alexander", 4)    // Returns "Alex"
Syntax
<Result> = Complete(<String to use> , <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>: 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

Various

  • A WLanguage error occurs if <Length> is less than 0.
  • The index of a string starts from 1.

Complete and UNICODE

<String to use> and <Character> can be both:
  • ANSI.
  • UNICODE.
  • 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 following conversion rule is used for the Unicode systems (Windows CE):
  • 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.
For more details on UNICODE, see Managing UNICODE.
Reminder: The linguistic parameters used are defined during the call to ChangeCharset.
Business / UI classification: Neutral code
Component: wd270vm.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment