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/iPadApple WatchUniversal Windows 10 AppWindows Mobile
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 15 and later
Android This function is now available for Android applications.
New in version 15
Android This function is now available for Android applications.
Android This function is now available for Android applications.
Versions 17 and later
iPhone/iPad This function is now available for iPhone/iPad applications.
New in version 17
iPhone/iPad This function is now available for iPhone/iPad applications.
iPhone/iPad This function is now available for iPhone/iPad applications.
Versions 18 and later
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
New in version 18
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Versions 21 and later
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Apple Watch This function is now available in Apple Watch 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 : wd260vm.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Exemplo Complete

SAI_resultado+="1" // TIPO DE REGISTRO // 001 a 001
SAI_resultado+=Complete("",16) // 02 a 017
SAI_resultado+=Complete(SAI_texto,25) // 018 a 030
SAI_resultado+=CR
SAI_resultado+="2" // TIPO DE REGISTRO // 001 a 001
SAI_resultado+=CR
SAI_resultado+="3" // TIPO DE REGISTRO // 001 a 001


//Blog com video e Exemplo
http://windevdesenvolvimento.blogspot.com.br/2016/03/curso-windev-string-006-string-complete.html
De matos AMARILDO
09 Mar. 2016