Jump to content

Substring/Top and tail: Difference between revisions

m
(added ocaml)
Line 248:
| _ -> String.sub str 1 ((String.length str) - 2)
 
let main() =
print_endline (strip_first_char "knight");
print_endline (strip_last_char "socks");
Cookies help us deliver our services. By using our services, you agree to our use of cookies.