repl.txt (513B)
1 {{alias}}( str, len[, ending] ) 2 Truncates a string to a specified length. 3 4 Parameters 5 ---------- 6 str: string 7 Input string. 8 9 len: integer 10 Output string length. 11 12 ending: string (optional) 13 Custom ending. Default: '...'. 14 15 Returns 16 ------- 17 out: string 18 Truncated string. 19 20 Examples 21 -------- 22 > var str = 'beep boop'; 23 > var out = {{alias}}( str, 5 ) 24 'be...' 25 26 > out = {{alias}}( str, 5, '|' ) 27 'beep|' 28 29 See Also 30 --------