12-18-2009
Try strtoimax() if int64 is the same as intmax_t on your system.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Is there some place like this unix.com for linux questions? a forum like area to ask questions? I love this site, i've learned a lot (use unix - solaris, and linux - redhat). Unfortunately redhat.com has gotten rid of their support forums, everything is in a list type format and I don't want to... (6 Replies)
Discussion started by: kymberm
6 Replies
2. Linux
Hi everyone,
I came from a diffrent UNIX background and am trying to learn Linux (Red Hat) in a hurry. I would be very grateful if you could help me with the following questions. I know the answers for questions 1, 3, and 4 in a Sun Solaris environment, but not in Linux... Thanks in advance for... (3 Replies)
Discussion started by: Enigma777
3 Replies
3. Programming
Hi, I'm converting a C program that I made using the Visual Studio. I now use GCC (over Linux) and can't find some equivalences. I changed my __int64 definitions to unsigned long long, but can't find an equivalent to the microsoft i64toa() function, which let you convert a char* to a 64 bit... (1 Reply)
Discussion started by: Raspoutine
1 Replies
4. Shell Programming and Scripting
What is the string that would satisfy this expression: "^gs{3}$" ?
What is an expression that would satisfy all these strings: csafaq.exe, csafbc.exe, asdfcd.exe?
Also, To catch these files, :
gdnus1862.exe
gdnus10.exe
gdnus250.exe
gdnus2337.exe
I am using this regex. :... (2 Replies)
Discussion started by: komputersman
2 Replies
5. Shell Programming and Scripting
I have a file that contains the following:
:@:176:@:4:@:name:@:file:@:this is
a summary:@:description can be
long but who knows
can even have <br> tags.:@:how to:@:type:@:18544:@:550:@:400:END:
:@:177:@:9:@:name:@:file:@:summary:@:this
will containg... (18 Replies)
Discussion started by: sysrenan
18 Replies
6. Programming
Recently my project needs int64 variables. However my os and computer are both 32bits.
So how can i use int64 as a parameter in a function.
and is int64 a structure as user-defined structures.....
???
thanx
i am waiting for ur answer:rolleyes: (2 Replies)
Discussion started by: macroideal
2 Replies
7. Shell Programming and Scripting
Hi.
I will be very appreciated for help.
I need replace all characters into string with \ (backslash)
I mean if I have word abcdefg as input.
How I can convert it to \a\b\c\d\e\f\g
Thanks and best regards. Staas. (5 Replies)
Discussion started by: beckss
5 Replies
8. Shell Programming and Scripting
I need to search the file using strings "Request Type" , " Request Method" , "Response Type" and by using result set find the xml tags and convert into a single line?. below are the scenarios.
Cat test
Nov 10, 2012 5:17:53 AM
INFO: Request Type
Line 1.... (5 Replies)
Discussion started by: laknar
5 Replies
9. UNIX for Advanced & Expert Users
I have a messy, pipe-delimited ("|") input dataset.
I would like to create a file of ID plus each component of field 4 which is delimited by ";" into a long, skinny shape for easier processing.
A couple of complications are that field 4 may contain both commas and linefeed characters from the... (9 Replies)
Discussion started by: 91674io
9 Replies
10. Shell Programming and Scripting
Where is the delete or remove post option? (1 Reply)
Discussion started by: f77hack
1 Replies
LEARN ABOUT FREEBSD
strtoimax
STRTOL(3) BSD Library Functions Manual STRTOL(3)
NAME
strtol, strtoll, strtoimax, strtoq -- convert a string value to a long, long long, intmax_t or quad_t integer
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <stdlib.h>
#include <limits.h>
long
strtol(const char * restrict nptr, char ** restrict endptr, int base);
long long
strtoll(const char * restrict nptr, char ** restrict endptr, int base);
#include <inttypes.h>
intmax_t
strtoimax(const char * restrict nptr, char ** restrict endptr, int base);
#include <sys/types.h>
#include <stdlib.h>
#include <limits.h>
quad_t
strtoq(const char *nptr, char **endptr, int base);
DESCRIPTION
The strtol() function converts the string in nptr to a long value. The strtoll() function converts the string in nptr to a long long value.
The strtoimax() function converts the string in nptr to an intmax_t value. The strtoq() function converts the string in nptr to a quad_t
value. The conversion is done according to the given base, which must be between 2 and 36 inclusive, or be the special value 0.
The string may begin with an arbitrary amount of white space (as determined by isspace(3)) followed by a single optional '+' or '-' sign. If
base is zero or 16, the string may then include a ``0x'' prefix, and the number will be read in base 16; otherwise, a zero base is taken as
10 (decimal) unless the next character is '0', in which case it is taken as 8 (octal).
The remainder of the string is converted to a long, long long, intmax_t or quad_t value in the obvious manner, stopping at the first charac-
ter which is not a valid digit in the given base. (In bases above 10, the letter 'A' in either upper or lower case represents 10, 'B' repre-
sents 11, and so forth, with 'Z' representing 35.)
If endptr is not NULL, strtol() stores the address of the first invalid character in *endptr. If there were no digits at all, however,
strtol() stores the original value of nptr in *endptr. (Thus, if *nptr is not '