---
url: >-
  /statelake/scripting-reference/functions-and-procedures/string-functions/dupestring.md
---

# DupeString

**DupeString** is short for duplicate-string. The function returns a concatenated string, using the value specified by **AText**, and repeating it **ACount** number of times.

**Declaration**: Function DupeString(const AText : string; ACount : Integer) : string;

See the example below.

```pascal
procedure ScriptEvent(var Value:Variant);
var
  Str1, Str2 : string;
begin
  Str1 := 'Ha';
  Str2 := DupeString(Str1,5);
  LogInfo(Str2);               //Result is  'HaHaHaHaHa'
  LogInfo('');
end;
```
