StringExtensions.Fill(this string chars, int? n) Method
.NET Standard 2.x
Builds a string of the specified length by repeating the specified characters until the result string is long enough.
Namespace: PowerScript.Bridge
Assembly: PowerScript.Bridge.dll
Syntax
public static string Fill(this string chars, int? n);
Parameters
chars
System.String
A string whose value will be repeated to fill the return string.
n
System.Int32
An int whose value is the length of the string you want to return.
Returns
System.String
Returns a string n characters long filled with the characters in the argument chars. If the argument chars has more than n characters, the first n characters of chars are used to fill the return string. If the argument chars has fewer than n characters, the characters in chars are repeated until the return string has n characters. If any argument's value is null
, Fill
returns null
.
Examples
Coming soon.
Applies to
.NET Standard
2.x