From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id TAA17657 for caml-redistribution; Wed, 2 Jul 1997 19:22:31 +0200 (MET DST) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id OAA08780 for ; Wed, 2 Jul 1997 14:38:08 +0200 (MET DST) Received: from nenuphar.saclay.cea.fr (nenuphar.saclay.cea.fr [132.166.192.7]) by nez-perce.inria.fr (8.8.5/8.7.3) with ESMTP id OAA07653 for ; Wed, 2 Jul 1997 14:38:06 +0200 (MET DST) Received: from vega.serma.cea.fr by nenuphar.saclay.cea.fr (8.8.5/ CEANET-ROUTER-3.0) with ESMTP id OAA20791 for ; Wed, 2 Jul 1997 14:38:05 +0200 (MET DST) Received: (from basile@localhost) by vega.serma.cea.fr (8.8.6/8.8.5) id OAA12596; Wed, 2 Jul 1997 14:39:43 +0200 Date: Wed, 2 Jul 1997 14:39:43 +0200 Message-Id: <199707021239.OAA12596@vega.serma.cea.fr> From: Basile STARYNKEVITCH MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit To: caml-list@inria.fr Subject: String wishes for Ocaml X-Mailer: VM 6.32 under 19.15 XEmacs Lucid Sender: weis Hello All, [[abreged french version below]] I have some few small (except the 3rd) wishes for next Ocaml release, regarding string processing: 1. some more basic string utilities in the standard Ocaml library (not the Str package), like * strchr in C : String.pos str ch = search ch in str returning first position or raise Not_found * strrchr in C : String.last_pos str ch = search ch in str returning last position or raise Not_found * String.substr str first last = get a substring of str from index first to last (String.sub takes a length, not a last index) 2. perhaps something similar to strtok in C (but reentrant) 3. Much harder. A sort of scanf facility. Perhaps the format could be a list of formatting element... I know that this last point is difficult. Actually, the Format.printf type inference mechanism (which seems built in the compiler, not in the library) is stiff a bit of magic for me. .................... [[-- version française abrégée - lire plutot l'anglais ci-dessus --]] Quelques souhaits pour la prochaine version d'Ocaml relatifs aux chaines de caractères. 1. Quelques utilitaires manquants, a la maniere de strchr & strrchr en Ansi C. Ainsi que substr qui renvoie la sous-chaine de premier et dernier rangs données 2. Quelques chose comme strtok en C 3. Bien plus difficile. Un scanf ou equivalent. Mais c'est difficile, et pour moi, l'inference de type de Format.printf (qui me parait être dans le compilateur, pas la librarie) reste magique pour moi. Merci à tous N.B. Any opinions expressed here are solely mine, and not of my organization. N.B. Les opinions exprimees ici me sont personnelles et n engagent pas le CEA. ---------------------------------------------------------------------- Basile STARYNKEVITCH ---- Commissariat à l Energie Atomique DRN/DMT/SERMA * CEA/Saclay bat.470 * 91191 GIF/YVETTE CEDEX * France fax: (33) 01,69.08.85.68; phone: 01,69.08.40.66; home: 01,46.65.45.53 email: Basile . Starynkevitch @ cea . fr (but remove white space) I speak french, english, russian. Je parle français, anglais, russe. ----------------------------------------------------------------------