ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Standard functions / String functions
  • Function RepeatString and Unicode (syntax 1)
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Concatenates N number of copies of the same specified string or buffer.
Example
Res = RepeatString("x", 4)     // Renvoie "xxxx"
Res = RepeatString("Boby", 2)  // Renvoie "BobyBoby"
Res = RepeatString("", 2)      // Renvoie ""
Res = RepeatString("", 0)      // Renvoie ""
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

Function 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 in parameter is in Unicode format, the result will be in Unicode format.
Note If the result of the RepeatString function used on an ANSI string is assigned to a Unicode string (and vice versa), ANSI/Unicode conversion will be implicitly performed.
For more details, see Unicode management.
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: 03/28/2025

Send a report | Local help