Sv PadStart

From GECK
Jump to: navigation, search


A function added by the AnhNVSE Plugin.

Description

Pads the current string with another string (multiple times, if needed) until the resulting string reaches the given length. The padding is applied from the start of the current string.

Syntax

[help]
(string) Sv_PadStart srcString:string targetLength:int padString:string 

Example

string_var myString

myString = Sv_PadStart "Hello" 10 "*" 

; myString = "*****Hello"
string_var myString

myString = Sv_PadStart "Hello" 10 "foo" 

; myString = "foofoHello"