/****************************************************************************** * This program illustrates some of the string functions in Utils * * Copyright © 2020 Richard Lesh. All rights reserved. *****************************************************************************/ #![allow(dead_code)] #![allow(non_snake_case)] #![allow(non_upper_case_globals)] #[macro_use] mod utils; static LTRSTR:String = " Spaces to the left"; static RTRSTR:String = "Spaces to the right "; static TRIMSTR:String = " Spaces at each end "; static BLANK:String = " \t\n "; static LOWERSTR:String = "This String is Lowercase"; static UPPERSTR:String = "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), '|'); }