[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'sysutils' (#rtl)

# TStringHelper.Create

Create a new string

## Declaration

Source position: syshelph.inc line 77

`public class function TStringHelper.Create(`
`AChar: Char;`
`ACount: SizeInt`
`):string; overload; class function TStringHelper.Create(`
`const AValue: array of Char`
`):string; overload; class function TStringHelper.Create(`
`const AValue: array of Char;`
`StartIndex: SizeInt;`
`ALen: SizeInt`
`):string; overload;`

## Description

Create returns a new string with an initial value based on the passed arguments:

- A character (ACHar) and a count (ACount, in which case a string is returned of the specified length, filled with AChar.
- An array of characters AValue. The returned string will have the same length as the array, and the characters will be copied from the elements in the array. Optionally, a starting index StartIndex (zero based) and length ALen can be specified, in which case the string will contain at most ALen characters, which will have been copied starting at index StartIndex.

## Errors

None.

## See also

StringOfChar |  | Return a string consisting of 1 character repeated N times.