caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Re:code
@ 2001-07-24 10:51 Sudhapaturi
  2001-07-24 21:44 ` Dimitri Ara
  0 siblings, 1 reply; 2+ messages in thread
From: Sudhapaturi @ 2001-07-24 10:51 UTC (permalink / raw)
  To: caml-list; +Cc: supraja_a

[-- Attachment #1: Type: text/plain, Size: 220 bytes --]

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?

[-- Attachment #2: Type: text/html, Size: 297 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Caml-list] Re:code
  2001-07-24 10:51 [Caml-list] Sudhapaturi
@ 2001-07-24 21:44 ` Dimitri Ara
  0 siblings, 0 replies; 2+ messages in thread
From: Dimitri Ara @ 2001-07-24 21:44 UTC (permalink / raw)
  To: Sudhapaturi; +Cc: caml-list, supraja_a

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-07-25 21:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-24 10:51 [Caml-list] Sudhapaturi
2001-07-24 21:44 ` Dimitri Ara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).