diff --git a/string/index.d.ts b/string/index.d.ts index 9e4a28b709..e47c0d7eca 100644 --- a/string/index.d.ts +++ b/string/index.d.ts @@ -71,7 +71,7 @@ interface StringJS { replaceAll(ss: string, newStr: string): StringJS; strip(...strings: string[]): StringJS; - + stripLeft(...strings: string[]): StringJS; stripRight(...strings: string[]): StringJS; @@ -92,6 +92,8 @@ interface StringJS { times(n: number): StringJS; + titleCase(): StringJS; + toBoolean(): boolean; toCSV(delimiter?: string, qualifier?: string): StringJS; diff --git a/string/string-tests.ts b/string/string-tests.ts index 64195738c4..2eee48b3dd 100644 --- a/string/string-tests.ts +++ b/string/string-tests.ts @@ -209,6 +209,10 @@ console.log(S(str).template(values).s) //'Hello JP! How are you doing during the S(' ').times(5).s //' ' S('*').times(3).s //'***' +S('Like ice in the sunshine').titleCase().s // 'Like Ice In The Sunshine' +S('data_rate').titleCase().s // 'Data_Rate' +S('background-color').titleCase().s // 'Background-Color' + S('true').toBoolean() //true S('false').toBoolean() //false S('hello').toBoolean() //false