English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] [repost] Request for more String functions
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-02-21 (01:18)
From: David Fox <david.fox@l...>
Subject: Re: [Caml-list] [repost] Request for more String functions

William D. Neumann wrote:

>On Fri, 20 Feb 2004, Richard Jones wrote:
>>String.truncate  - truncate a string to a given length
>I call my version procrustes, because it will also pad a string that is
>too short with an optional padding character (defaults to ' ').  In any case,
>it would be great to see some of these functions added to the standard
>library so I wouldn't have to tote around my Wdn module...
The Scheme standard calls these functions "take" (take the first n 
elements) and
"drop" (drop the first n elements.)  I don't think it padded them.