PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Operating mode in GO mode and at run time
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:
  • the size of a character string, which means the number of characters found in the character string (including the space and binary 0 characters).
  • the size of a buffer, which means the number of bytes found in the buffer.
WEBDEV - Browser codePHP In this version, you cannot find out the size of a buffer.
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
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 JavaAjaxUser code (UMC)
MyBuffer is Buffer = "Developing is fantastic"
Length(MyBuffer)       // Returns 23
Windows Mobile
MyBuffer is Buffer = "Developing is fantastic"
Length(MyBuffer)        // Returns 30
Syntax

Size of character string Hide the details

<Result> = Length(<Source String>)
<Result>: Integer
Number of characters found in the string.
<Source String>: Character string
Character string whose size will be calculated.
WINDEVWEBDEV - Server codeReports and QueriesAndroidAndroid Widget iPhone/iPadApple WatchWindows MobileUniversal Windows 10 AppJavaAjaxUser code (UMC)

Size of buffer Hide the details

<Result> = Length(<Source Buffer>)
<Result>: Integer
Number of bytes found in the buffer.
<Source Buffer>: Buffer
Buffer whose size will be calculated.
Windows Mobile In UNICODE, each character occupies two memory bytes. Therefore, the size of a buffer containing a UNICODE string is twice the number of characters actually found in the string in Windows.
LinuxiPhone/iPadApple 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.
Remarks
Windows Mobile

Operating mode in GO mode and at run time

In GO mode (simulation on the development computer), when Length is used on a buffer (syntax 2), <Result> corresponds to the number of characters found in the buffer (and not to the number of bytes).
For example, running the following code:
MyBuffer is Buffer = "WINDEV is tremendous"
Length(MyBuffer)
  • in GO mode, this code returns 21.
  • at run time, this code returns 42.
The differences between GO mode (simulator) and real use are presented in Differences between GO mode and real use.
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
EXTRAIR TEXTO
n_tamanho_adicionais is int=Length(EDT_DADOS_aDICIONAIS)
n_tamanho_campo is int=Length("OC 1")
n_posicao is int=Position(EDT_DADOS_aDICIONAIS," OC 1 ",1,FromBeginning)
s_transfere is string=EDT_DADOS_aDICIONAIS[[1 TO n_posicao]]
_restante is string=EDT_DADOS_aDICIONAIS[[n_posicao+5 TO n_tamanho_adicionais]]

EDT_DADOS_aDICIONAIS=s_transfere+"OC 200"
// AQUI ESTOU ACRESCENTANDO NO MEIO DO TEXTO O QUE VOU SUBSTITUIR
// HERE I AM ADDING INTO THE TEXT WHAT YOU WILL REPLACE
// AQUÍ ESTOY AÑADIDO EN EL MEDIO DEL TEXTO LO QUE VUELVE SUSTITUIR

IF _restante<>"" THEN
EDT_DADOS_aDICIONAIS+=" "+NoSpace(_restante)
END

// BLOG COM VIDEO E EXEMPLO EXTRAIR TEXTO

http://windevdesenvolvimento.blogspot.com.br/2017/07/aula-1226-windev-string-38-extrair-texto.html

https://www.youtube.com/watch?v=chR3Od93osQ


De matos
Jul. 29 2017
Exemplo Tamanho String
SAI_resultado=Length(SAI_texto)

//FRANCES
SAI_resultado=Taille(SAI_texto)

//Blog com Video e Exemplo
http://windevdesenvolvimento.blogspot.com.br/2016/02/curso-windev-string-003-tamanho-das.html
De matos AMARILDO
Feb. 26 2016