///|
/// Code-unit value of a character literal.
fn cu(c : Char) -> Int {
c.to_int()
}
///|
fn is_ws(c : Int) -> Bool {
c == cu(' ') || c == cu('\t') || c == cu('\n') || c == cu('\r')
}
///|
/// Copy a code-unit range into a new string without unicode-boundary checks,
/// so fuzzed input can never trigger slice panics.
fn substring(input : String, from : Int, to : Int) -> String {
let sb = StringBuilder()
for k in from.. String {
let len = s.length()
let mut a = 0
let mut b = len
while a < b && is_ws(s[a].to_int()) {
a += 1
}
while b > a && is_ws(s[b - 1].to_int()) {
b -= 1
}
if a == 0 && b == len {
s
} else {
substring(s, a, b)
}
}