Skip to content

String Functions

csamak edited this page May 26, 2014 · 1 revision

##String Functions

All of the AQL string functions are mapped to System.String.

###Example

    dv.FacebookUsers.Select(u => u.name[0]);

will generate

    for $u in dataset FacebookUsers return string-to-codepoint($u.name)[0]

For an example of each function, view the relevant tests.

###Supported Functions

  • string-to-codepoint
    • string-to-codepoint(str) : str.ToCharArray()
    • string-to-codepoint(str)[0] : str[0]
  • codepoint-to-string : new string(str)
  • contains : str.Contains("other")
  • like is currently not supported
  • starts-with : str.StartsWith(otherStr)
  • ends-with : str.EndsWith("other")
  • string-concat is currently not supported
  • string-join : string.Join(",", m.Messages)
  • lowercase : str.ToLower()
  • matches is currently not supported
  • replace is currently not supported
  • string-length : str.Length
  • substring : str.Substring(50, 10) (parameters have the same meaning as in AQL)
  • substring-before is currently not supported
  • substring-after is currently not supported

Clone this wiki locally