From: Dimitri Ara <dimitri.ara@mail.dotcom.fr>
To: Sudhapaturi@aol.com
Cc: caml-list@inria.fr, supraja_a@hotmail.com
Subject: Re: [Caml-list] Re:code
Date: 24 Jul 2001 23:44:13 +0200 [thread overview]
Message-ID: <87ae1uypci.fsf@corwin.ambre.net> (raw)
In-Reply-To: Sudhapaturi@aol.com's message of "Tue, 24 Jul 2001 06:51:34 EDT"
Sudhapaturi@aol.com a écrit :
> I am very new in this. I wanted to write a code to get a match for the
> following.
> If a word is given it should search where the vowels are ?
> for example a word like structure .
> Can you please tell me How I can do that?
I'm not sure i understood what you want. Here is a function
vowels_pos such as (vowels_pos s) is a list of position of vowels
in the word s.
let vowels_pos s =
let pos = ref [] in
for i = 0 to String.length s - 1 do
match s.[i] with
| 'a' | 'e' | 'i' | 'o' | 'u' -> pos := i :: !pos
| _ -> ()
done ;
!pos
--
> Notre devoir, pour leur bien et pour le bien de Linux, est de te
> flinguer avant que tu ne les sacrifies (fût-ce avec les meilleures
> intentions du monde).
-+- TP In: Guide du linuxien pervers : "De la pédagogie par l'Exemple"
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
prev parent reply other threads:[~2001-07-25 21:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-24 10:51 Sudhapaturi
2001-07-24 21:44 ` Dimitri Ara [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ae1uypci.fsf@corwin.ambre.net \
--to=dimitri.ara@mail.dotcom.fr \
--cc=Sudhapaturi@aol.com \
--cc=caml-list@inria.fr \
--cc=supraja_a@hotmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox