repl.txt (944B)
1 2 {{alias}}( str, search[, position] ) 3 Tests if a `string` starts with the characters of another `string`. 4 5 If provided an empty `search` string, the function always returns `true`. 6 7 Parameters 8 ---------- 9 str: string 10 Input string. 11 12 search: string 13 Search string. 14 15 position: integer (optional) 16 Position at which to start searching for `search`. If less than `0`, the 17 start position is determined relative to the end of the input string. 18 19 Returns 20 ------- 21 bool: boolean 22 Boolean indicating whether a `string` starts with the characters of 23 another `string`. 24 25 Examples 26 -------- 27 > var bool = {{alias}}( 'Beep', 'Be' ) 28 true 29 > bool = {{alias}}( 'Beep', 'ep' ) 30 false 31 > bool = {{alias}}( 'Beep', 'ee', 1 ) 32 true 33 > bool = {{alias}}( 'Beep', 'ee', -3 ) 34 true 35 > bool = {{alias}}( 'Beep', '' ) 36 true 37 38 See Also 39 -------- 40