Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

stoi(9f) [opensolaris man page]

stoi(9F)						   Kernel Functions for Drivers 						  stoi(9F)

NAME
stoi, numtos - convert between an integer and a decimal string SYNOPSIS
#include <sys/ddi.h> int stoi(char **str); void numtos(unsigned long num, char *s); INTERFACE LEVEL
Solaris DDI specific (Solaris DDI). PARAMETERS
str Pointer to a character string to be converted. num Decimal number to be converted to a character string. s Character buffer to hold converted decimal number. DESCRIPTION
stoi() The stoi() function returns the integer value of a string of decimal numeric characters beginning at **str. No overflow checking is done. *str is updated to point at the last character examined. numtos() The numtos() function converts a long into a null-terminated character string. No bounds checking is done. The caller must ensure there is enough space to hold the result. RETURN VALUES
The stoi() function returns the integer value of the string str. CONTEXT
The stoi() function can be called from user, interrupt, or kernel context. SEE ALSO
Writing Device Drivers NOTES
The stoi() function handles only positive integers; it does not handle leading minus signs. SunOS 5.11 16 Jan 2006 stoi(9F)

Check Out this Related Man Page

stoi(9F)						   Kernel Functions for Drivers 						  stoi(9F)

NAME
stoi, numtos - convert between an integer and a decimal string SYNOPSIS
#include <sys/ddi.h> int stoi(char **str); void numtos(unsigned long num, char *s); INTERFACE LEVEL
Solaris DDI specific (Solaris DDI). PARAMETERS
str Pointer to a character string to be converted. num Decimal number to be converted to a character string. s Character buffer to hold converted decimal number. DESCRIPTION
stoi() The stoi() function returns the integer value of a string of decimal numeric characters beginning at **str. No overflow checking is done. *str is updated to point at the last character examined. numtos() The numtos() function converts a long into a null-terminated character string. No bounds checking is done. The caller must ensure there is enough space to hold the result. RETURN VALUES
The stoi() function returns the integer value of the string str. CONTEXT
The stoi() function can be called from user, interrupt, or kernel context. SEE ALSO
Writing Device Drivers NOTES
The stoi() function handles only positive integers; it does not handle leading minus signs. SunOS 5.11 16 Jan 2006 stoi(9F)
Man Page

6 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How To Make Decimal Point Fall On The 15th Character On The Screen

If i have a variable which is a decimal number, i.e 34.05 How can you make decimal point fall on the 15th character on the screen? Or any other that you can specify? Can you do it using sed or awk? (3 Replies)
Discussion started by: Vozx
3 Replies

2. Programming

simple question on string concat

This is a simple question... char *str = NULL; int num = 0; scanf ("%d", &num); str = ??? I want str to point to the string num.txt For e.g: If user enters num = 5, str should point to "5.txt" How do I do that ? Thanks (2 Replies)
Discussion started by: the_learner
2 Replies

3. Shell Programming and Scripting

string checking

lets think str is a variable...how can i check it is pure alphabetic or not for numeric checking i have used echo $str|grep -v ] but the command echo $str|grep -v ] is not working (1 Reply)
Discussion started by: arghya_owen
1 Replies

4. UNIX for Dummies Questions & Answers

Condition for decimal numbers

Hi experts, My number output has somehting like below filename /temp 0.23 10.23 How do i put a condition to the above numbers? e.g if then the . seem to give me problems. Pls help. thanks ---------- Post updated at 05:25 PM ---------- Previous update was at 05:23 PM... (9 Replies)
Discussion started by: streddy
9 Replies

5. Shell Programming and Scripting

PERL : Use of a variable in a tr

Hi, I want to count the number of occurences of a character in a string variable ($str). The character is stored in a another variable ($sepchr). I am using tr as : $count = ($str =~ tr/$sepchr//); This did not work. I found in another thread about using eval. I used eval as : ... (13 Replies)
Discussion started by: sinpeak
13 Replies

6. Shell Programming and Scripting

Replace Special Character With Next Present Byte

Hi, First find the special character, from the special character take next two bytes convert the bytes to decimal and replace with next present byte of decimal value times. E.g. Input: 302619ú1A? Output: 302619(3 spaces for ú1A)?????????????????????????? Thanks, Dines (27 Replies)
Discussion started by: dineshnak
27 Replies