caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] One more question :)
@ 2003-02-23 17:47 Alexander S. Usov
  2003-02-23 18:43 ` Alessandro Baretta
  0 siblings, 1 reply; 4+ messages in thread
From: Alexander S. Usov @ 2003-02-23 17:47 UTC (permalink / raw)
  To: OCaml mailing list

Hi again :)

Is there any way to append a character to string?
The only way I found is to use somthing like

let app c str =
  let str2 = " " ^ str
  in
    str2.[0] <- c; str2 ;;

-- 
Best regards,
  Alexander.

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


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

* Re: [Caml-list] One more question :)
  2003-02-23 17:47 [Caml-list] One more question :) Alexander S. Usov
@ 2003-02-23 18:43 ` Alessandro Baretta
  2003-02-23 19:02   ` Alessandro Baretta
  0 siblings, 1 reply; 4+ messages in thread
From: Alessandro Baretta @ 2003-02-23 18:43 UTC (permalink / raw)
  To: Alexander S. Usov, Ocaml



Alexander S. Usov wrote:
> Hi again :)
> 
> Is there any way to append a character to string?
> The only way I found is to use somthing like
> 
> let app c str =
	(String.make 1 c) str

Alex

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


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

* Re: [Caml-list] One more question :)
  2003-02-23 18:43 ` Alessandro Baretta
@ 2003-02-23 19:02   ` Alessandro Baretta
  2003-02-23 19:14     ` Alexander S. Usov
  0 siblings, 1 reply; 4+ messages in thread
From: Alessandro Baretta @ 2003-02-23 19:02 UTC (permalink / raw)
  To: Ocaml



Alessandro Baretta wrote:

>> let app c str =
>     (String.make 1 c) str

Ooops...

let app c str =
     (String.make 1 c) ^ str

Alex

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


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

* Re: [Caml-list] One more question :)
  2003-02-23 19:02   ` Alessandro Baretta
@ 2003-02-23 19:14     ` Alexander S. Usov
  0 siblings, 0 replies; 4+ messages in thread
From: Alexander S. Usov @ 2003-02-23 19:14 UTC (permalink / raw)
  To: Alessandro Baretta; +Cc: OCaml mailing list

On Sun, 2003-02-23 at 20:02, Alessandro Baretta wrote:
> Alessandro Baretta wrote:
> 
> >> let app c str =
> >     (String.make 1 c) str
> 
> Ooops...
> 
> let app c str =
>      (String.make 1 c) ^ str

Thanks !

-- 
Best regards,
  Alexander.

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


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

end of thread, other threads:[~2003-02-23 19:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-23 17:47 [Caml-list] One more question :) Alexander S. Usov
2003-02-23 18:43 ` Alessandro Baretta
2003-02-23 19:02   ` Alessandro Baretta
2003-02-23 19:14     ` Alexander S. Usov

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).