All of lore.kernel.org
 help / color / mirror / Atom feed
* compatible header functions
@ 2003-01-25 11:43 n  mishra
  2003-01-25 12:01 ` Steven Smith
  0 siblings, 1 reply; 4+ messages in thread
From: n  mishra @ 2003-01-25 11:43 UTC (permalink / raw)
  To: linux-newbie

Hi all!
I am new to writing c programs in linux and I have trouble finding 
the following functions in the header files.
1)itoa: to convert an integer to a string.
2)ltoa: to convert long integer to a string.
3)strset: to set the whole string to a given character.
Please tell me if these are present in linux or if they have any 
equivalent functions.
Thanks in advance.
mishra.

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

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

* compatible header functions
@ 2003-01-25 11:44 n  mishra
  2003-01-25 13:25 ` Robert Schiele
  0 siblings, 1 reply; 4+ messages in thread
From: n  mishra @ 2003-01-25 11:44 UTC (permalink / raw)
  To: linux-gcc

Hi all!
I am new to writing c programs in linux and I have trouble finding 
the following functions in the header files.
1)itoa: to convert an integer to a string.
2)ltoa: to convert long integer to a string.
3)strset: to set the whole string to a given character.
Please tell me if these are present in linux or if they have any 
equivalent functions.
Thanks in advance.
mishra.


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

* Re: compatible header functions
  2003-01-25 11:43 n  mishra
@ 2003-01-25 12:01 ` Steven Smith
  0 siblings, 0 replies; 4+ messages in thread
From: Steven Smith @ 2003-01-25 12:01 UTC (permalink / raw)
  To: n mishra; +Cc: linux-newbie

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

> I am new to writing c programs in linux and I have trouble finding 
> the following functions in the header files.
> 1)itoa: to convert an integer to a string.
sprintf(buf, "%d", integer);

> 2)ltoa: to convert long integer to a string.
sprintf(buf, "%ld", integer);

> 3)strset: to set the whole string to a given character.
Not sure about this one.  I would probably write my own if I needed
it, or use strlen() and memset().

Steven Smith,
sos22@cam.ac.uk.

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: compatible header functions
  2003-01-25 11:44 compatible header functions n  mishra
@ 2003-01-25 13:25 ` Robert Schiele
  0 siblings, 0 replies; 4+ messages in thread
From: Robert Schiele @ 2003-01-25 13:25 UTC (permalink / raw)
  To: n mishra; +Cc: linux-gcc

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

On Sat, Jan 25, 2003 at 11:44:02AM -0000, n  mishra wrote:
> Hi all!
> I am new to writing c programs in linux and I have trouble finding 
> the following functions in the header files.

These are proprietary vendor extensions and not part of the C
standard.

> 1)itoa: to convert an integer to a string.
> 2)ltoa: to convert long integer to a string.

You can do the same with sprintf().

> 3)strset: to set the whole string to a given character.

Look up the function memset().

Robert

-- 
Robert Schiele			Tel.: +49-621-181-2517
Dipl.-Wirtsch.informatiker	mailto:rschiele@uni-mannheim.de

[-- Attachment #2: Type: application/pgp-signature, Size: 481 bytes --]

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

end of thread, other threads:[~2003-01-25 13:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-25 11:44 compatible header functions n  mishra
2003-01-25 13:25 ` Robert Schiele
  -- strict thread matches above, loose matches on Subject: below --
2003-01-25 11:43 n  mishra
2003-01-25 12:01 ` Steven Smith

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.