19 lines
907 B
OCaml
19 lines
907 B
OCaml
|
(***********************************************************************)
|
||
|
(* *)
|
||
|
(* Caml Special Light *)
|
||
|
(* *)
|
||
|
(* Valerie Menissier-Morain, projet Cristal, INRIA Rocquencourt *)
|
||
|
(* *)
|
||
|
(* Copyright 1995 Institut National de Recherche en Informatique et *)
|
||
|
(* Automatique. Distributed only by permission. *)
|
||
|
(* *)
|
||
|
(***********************************************************************)
|
||
|
|
||
|
(* $Id$ *)
|
||
|
|
||
|
let rec index_char str chr pos =
|
||
|
if pos >= String.length str then -1
|
||
|
else if String.get str pos = chr then pos
|
||
|
else index_char str chr (pos + 1)
|
||
|
;;
|