For Programmers: Free Programming Magazines  


Home > Archive > C > October 2005 > Re: manipulate string









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: manipulate string
crovax75@hotmail.com

2005-10-28, 6:55 pm


Christopher Benson-Manica wrote:
> Jirka Klaue <jklaue@tkn.tu-berlin.de> wrote:
>
>
> It's less tricky to do correctly than *scanf(), at least as has been
> shown by some recent posts.
>
> --
> Christopher Benson-Manica | I *should* know what I'm talking about - if I
> ataru(at)cyberspace.org | don't, I need to know. Flames welcome.


Hi all,

It works well with:

sprintf( year, "%.4s", str );
sprintf( month, "%.2s", str+4 );
sprintf( day, "%.2s", str+6 );

I want to thanks all of you for the fast replies!

Marcel

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2009 codecomments.com