let chop_last_char s = 
  String.sub s 0 (String.length s - 1)