/****************************************************************************** * This program illustrates some of the string functions in Utils * * Copyright © 2020 Richard Lesh. All rights reserved. *****************************************************************************/ mod utils; static ltrstr:&str = " Spaces to the left"; static rtrstr:&str = "Spaces to the right "; static trimstr:&str = " Spaces at each end "; static blank:&str = " \t\n "; static lowerstr:&str = "This String is Lowercase"; static upperstr:&str = "This String is Uppercase"; fn main() { println!("{}{}{}", '|', Utils.ltrim(ltrstr), '|'); println!("{}{}{}", '|', Utils.rtrim(rtrstr), '|'); println!("{}{}{}", '|', Utils.trim(trimstr), '|'); println!("{}{}{}", '|', Utils.trim(blank), '|'); println!("{}{}{}", '|', tolower(lowerstr), '|'); println!("{}{}{}", '|', toupper(upperstr), '|'); }