let
last_chars s n =
try
String
.sub s (
String
.length s - n) n
with
_
->
s