string class : PadEnd(int,string) method
Description
It concatenates a string that specified string has been repeated a specified number of times to the end of caller string and returns it as new string.
Syntax
stringInstance.PadEnd(int times, string repeatedString)
Arguments
| Class | Name | Description |
| int | times | Times of repetition |
| string | repeatedString | A repeated string. |
Return value
| Class | Description |
| string | A concatenated string. |
Sample code
| 1: | string str = "sample string"; |
| 2: | string newString = str.PadEnd(5,"x"); // The result (newString) is "sample stringxxxxx". |
Notes
An UnknownException (ArgumentOutOfRangeException) is thrown if you specify a value less than zero for the first argument.
Links for reference
None.


