PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Various
  • Complete function 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 given size. This string can be truncated or filled with space characters (or any other character) to reach the required size.
Versions 15 and later
Android This function is now available for the Android applications.
New in version 15
Android This function is now available for the Android applications.
Android This function is now available for the Android applications.
Versions 16 and later
Universal Windows 10 App This function is now available for the Windows Phone applications.
New in version 16
Universal Windows 10 App This function is now available for the Windows Phone applications.
Universal Windows 10 App This function is now available for the Windows Phone applications.
Versions 17 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 17
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPad This function is now available for the 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 Complete> , <Size> [, <Character>])
<Result>: Character string
Character string of the specified size, completed or truncated.
  • If the length of <String to Complete> is less than <Length>, the string is completed on the right by spaces or by specific characters if the <Character> parameter is specified.
  • If the length of <String to Complete> is greater than <Length>, the string is truncated on the right (equivalent to Left).
<String to Complete>: Character string
Initial character string to complete or to truncate. This character string is not modified.
<Size>: Integer
New length of character string (greater than or equal to 0).
<Character>: Optional character
Character used to fill the string. This character corresponds to a space character by default.
Remarks

Various

  • A WLanguage error occurs if <Size> is less than 0.
  • By convention, the first subscript of a character string is set to 1.

Complete function and UNICODE

<String to Complete> and <Character> can both be:
  • in 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):
  • It at least one of the strings is a buffer, all the strings are converted into buffers and the operation is performed with buffers,
  • otherwise, if at least one of the strings is in Unicode format, all the strings are converted into Unicode and the operation is performed in Unicode,
  • otherwise, the operation is performed in Ansi format.
The following conversion rule is used for the Unicode systems (Windows CE):
  • It at least one of the strings is a buffer, all the strings are converted into buffers and the operation is performed with buffers,
  • otherwise, the operation is performed in Unicode.
Note: If the result on an ANSI string is assigned to a UNICODE string (and conversely), the conversion will be implicitly performed.
See Managing the UNICODE format for more details.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230vm.dll
Windows Mobile wp230vm.dll
WEBDEV - Browser code WDJS.DLL
Java wd230java.jar
Linux wd230vm.so
Android wd230android.jar
Minimum required version
  • 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
Mar. 09 2016