10 lines
544 B
Plaintext
10 lines
544 B
Plaintext
def titleCase:
|
|
[splits("\\b") | select(length>0)]
|
|
| map((.[:1]|ascii_upcase) + (.[1:] |ascii_downcase))
|
|
| join("");
|
|
|
|
def lpad(string;len;fill):
|
|
if len == 0 then string else (fill * len)[0:len] + string end;
|
|
|
|
def rpad(string;len;fill):
|
|
if len == 0 then string else string + (fill * len)[0:len] end; |