ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / String functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Returns:
  • the length of a string, i.e., the number of characters in the string (including spaces and binary zeros).
  • the size of a buffer, i.e., the number of bytes in the buffer.
WEBDEV - Browser codePHP In this version, you cannot find out the size of a buffer.
Example
Length("Quasimodo")      // Returns 9
Length(" Quasimodo ")    // Returns 11
Length("A" + Charact(0))  // Returns 2
Length("")               // Returns 0
Length(" ")              // Returns 1
WINDEVWEBDEV - Server codeReports and QueriesAndroidAndroid Widget JavaUser code (UMC)Ajax
MyBuffer is Buffer = "Developing is fantastic"
Length(MyBuffer)       // Returns 23
Syntax

Getting the length of a string Hide the details

<Result> = Length(<Initial string>)
<Result>: Integer
Number of characters in the string.
<Initial string>: Character string
Character string whose size will be calculated.
WINDEVWEBDEV - Server codeReports and QueriesAndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystJavaUser code (UMC)Ajax

Getting the size of a buffer Hide the details

<Result> = Length(<Initial buffer>)
<Result>: Integer
Number of bytes in the buffer.
<Initial buffer>: Buffer
Buffer whose size will be calculated.
LinuxiPhone/iPadIOS WidgetApple Watch In UNICODE, each character occupies four memory bytes. Therefore, the size of a buffer containing a UNICODE string corresponds to four times the number of characters actually found in the string in Windows.
Component: wd300vm.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
video Length
https://youtu.be/SN-gjz1fmlY


n_tamanho_rntrc is int=Length(EDT_Rodo_rntrc_2)
IF n_tamanho_rntrc=8 THEN
// correto
ELSE
Info("Informar 8 Digitos Rntrc")
ReturnToCapture(EDT_Rodo_rntrc_2)
END
amarildo
08 Dec. 2018

Last update: 09/17/2024

Send a report | Local help