let no_blanks s = let len = String.length s in let buf = Buffer.create len in for i = 0 to len - 1 do match s.[i] with ' ' | '\n' | '\t' | '\r' -> () | c -> Buffer.add_char buf c done; Buffer.contents buf