ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / String functions
  • RepeatString and UNICODE (syntax 1)
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
Concatenates N number of copies of the same specified string or buffer.
Example
Res = RepeatString("x", 4)     // Returns "xxxx"
Res = RepeatString("Boby", 2)  // Returns "BobyBoby"
Res = RepeatString("", 2)      // Returns ""
Res = RepeatString("", 0)      // Returns ""
Syntax

Concatenating N number of copies of the same character string Hide the details

<Result> = RepeatString(<Initial string> , <Number of copies>)
<Result>: Character string
  • New string containing the specified number of copies of the initial string,
  • Empty string ("") if <Number of copies> is negative or null.
<Initial string>: Character string
Character string to repeat.
<Number of copies>: Integer
Number of times the <Initial string> must be repeated.

Concatenating N number of copies of the same buffer Hide the details

<Result> = RepeatString(<Initial buffer> , <Number of copies>)
<Result>: Buffer
  • New buffer containing the specified number of copies of the initial buffer,
  • Empty buffer if <Number of copies> is negative or null.
<Initial buffer>: Buffer
Buffer to repeat.
<Number of copies>: Integer
Number of times the <Initial buffer> must be repeated.
Remarks

RepeatString and UNICODE (syntax 1)

If the string passed as a parameter is an ANSI string, the result will be an ANSI string.
If the string passed as a parameter is a UNICODE string, the result will be a UNICODE string.
Remark: If the result of RepeatString on an ANSI string is assigned to a UNICODE string (and vice versa), the conversion will be implicitly performed.
For more details, see Managing UNICODE.
Component: wd300vm.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Video RepeatString
https://youtu.be/Y-AIz6wURyw

https://windevdesenvolvimento.blogspot.com/2019/04/dicas-2081-windev-webdev-mobile-string.html

// BTN_REPEATSTRING_rEPETE_sTRING

EDT_RESULTADO=RepeatString("=",30)

amarildo
21 Apr. 2019
Exemplo RepeatString
EDT_resultado=RepeatString("-",30)

// Blog com Video e Exemplo

http://windevdesenvolvimento.blogspot.com.br/2016/11/aula-972-windev-string-32-repeatstring.html

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


De matos
04 Dec. 2016

Last update: 08/22/2022

Send a report | Local help