Skip to main content

substring

Function substring 

Source
pub fn substring(value: &str, start: f64, length: Option<f64>) -> String
Expand description

Get a substring (XPath-style 1-based indexing).

XPath spec: Returns characters whose position p satisfies: round(start) <= p < round(start) + round(length)

ยงArguments

  • value - The source string
  • start - Start position (1-based, can be negative or fractional)
  • length - Optional length