home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Tools / Languages / Caml Light 0.61 / Source / src / lib / fstring.mli < prev    next >
Encoding:
Text File  |  1994-07-07  |  1.5 KB  |  40 lines  |  [TEXT/MPS ]

  1. (* String operations, without sanity checks *)
  2.  
  3. (* This module implements the same functions as the [string] module,
  4.    but does not perform bound checks on the arguments of the functions.
  5.    The functions are therefore faster than those in the [string] module,
  6.    but calling these functions with incorrect parameters (that is,
  7.    parameters that would cause the [Invalid_argument] exception to be raised
  8.    by the corresponding functions in the [string] module) can crash the
  9.    program. *)
  10.  
  11. (*--*)
  12.  
  13. value string_length : string -> int = 1 "string_length"
  14. ;;
  15. value nth_char : string -> int -> char = 2 "get_nth_char"
  16.   and set_nth_char : string -> int -> char -> unit = 3 "set_nth_char"
  17. ;;
  18. value prefix ^ : string -> string -> string
  19.   and sub_string : string -> int -> int -> string
  20. ;;
  21. value create_string : int -> string = 1 "create_string"
  22.   and make_string : int -> char -> string
  23. ;;
  24. value fill_string : string -> int -> int -> char -> unit
  25.     = 4 "fill_string"
  26.   and blit_string : string -> int -> string -> int -> int -> unit
  27.     = 5 "blit_string"
  28.   and replace_string : string -> string -> int -> unit
  29. ;;
  30. value eq_string : string -> string -> bool = 2 "=string"
  31.   and neq_string : string -> string -> bool = 2 "<>string"
  32.   and le_string : string -> string -> bool = 2 "<=string"
  33.   and lt_string : string -> string -> bool = 2 "<string"
  34.   and ge_string : string -> string -> bool = 2 ">=string"
  35.   and gt_string : string -> string -> bool = 2 ">string"
  36.   and compare_strings : string -> string -> int = 2 "compare_strings"
  37. ;;
  38. value string_for_read : string -> string
  39. ;;
  40.