Strlib:str-pad
From SA-MP Wiki
Description:
The function str_replace allows you to replace a string with another string in one huge string.
![]() Warning | This function is part of the strlib library. Click here to view its download page on the SA-MP forums. |
(str_pad)
sSource[] | The string you want to pad. |
iPadLength[] | The length of the new string. |
iPadChar | Optional character to pad the string with. |
Return Values:
Padded string.
[edit]
Example
new sString[] = "Pad me!"; print("'%s'", str_pad(sString, 10)); print("'%s'", str_pad(sString, 10, '@'));
[edit]
Output
'Pad me! ' 'Pad me!@@@'