syncbase: syncql: add query functions StrCat,StrIndex,StrLastIndex,StrRepeat,StrReplace,Trim,TrimLeft,TrimRight

StrCat(left, right string) string
StrCat returns the concatenation of two strings.
e.g., StrCat("abc", "def") returns "abcdef"

StrIndex(s, sep string) int
StrIndex returns the index of sep in s, or -1 is sep is not present in s.
e.g., StrIndex("abc", "bc") returns 1.

StrLastIndex(s, sep string) int
StrLastIndex returns the index of the last instance of sep in s, or -1 is sep is not present in s.
e.g., StrLastIndex("abcbc", "bc") returns 3.

StrRepeat(s string, count int) int
StrRepeat returns a new string consisting of count copies of the string s.
e.g., StrRepeat("abc", 3) returns "abcabcabc".

StrReplace(s, old, new string) string
StrReplace returns a copy of s with the first instance of old replaced by new.
e.g., StrReplace("abcdef", "bc", "zzzzz") returns "azzzzzdef".

Trim(s string) string
Trim returns a copy of s with all leading and trailing white space removed, as defined by Unicode.
e.g., Trim(" abc ") returns "abc".

TrimLeft(s string) string
TrimLeft returns a copy of s with all leading white space removed, as defined by Unicode.
e.g., TrimLeft(" abc ") returns "abc ".

TrimRight(s string) string
TrimRight returns a copy of s with all leading white space removed, as defined by Unicode.
e.g., TrimRight(" abc ") returns "abc ".

Change-Id: Ie843520e4107f93e6a1726e58f259246094439d5
7 files changed
tree: a1b1ae74d4bf26517f96cad3452f0ec93835b9d4
  1. v23/
  2. x/
  3. .gitignore
  4. AUTHORS
  5. CONTRIBUTORS
  6. LICENSE
  7. PATENTS
  8. VERSION