Last edited by johnsfine; at You may wish to use the strtol function there is an example of using it in the man page. For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. Originally Posted by harishisnow unsigned int ts; std:: Hello, I have the following example in my code. I did a search bash function but it get less results then find.

Uploader: Yorisar
Date Added: 20 April 2004
File Size: 22.65 Mb
Operating Systems: Windows NT/2000/XP/2003/2003/7/8/10 MacOS 10/X
Downloads: 32026
Price: Free* [*Free Regsitration Required]

Post as a guest Name.

Are you new to LinuxQuestions. The reason being that Linux uses utf-8 as the standard encoding. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features.

If you need to reset your password, click here. Open Source Consulting Domain Registration. Find More Posts by johnsfine.

Find More Posts by harishisnow. By using our site, you acknowledge that you have read and understand our Cookie PolicyPrivacy Policyand our Terms of Service.


You can use wcstol to convert from wide strings to integer values. Find More Posts by dwhitney Wouldn’t you just convert to UTF-8? By clicking “Post Your Answer”, you acknowledge that you have read our updated terms of serviceprivacy policy and cookie policyand that your continued use of the website is subject to these policies. Visit the following links: Originally Posted by harishisnow unsigned int ts; std:: Last edited by harishisnow; at Here’s a little utility I call it “sizes.

The question does not have to be directly related to Linux and any language is fair game. I can find something for MS wtoi but I can find anything in a standard Linux lib. Problem with atoi in pthreads.

atoi(3) – Linux man page

You are currently viewing LQ as a guest. Originally Posted by harishisnow Can somebody please tell me why this is happening? Please visit this page to clear all LQ-related cookies. Hello, The scenario works fine with the strtoll function.


If you’d like to contribute content, attoi us know. Ascii digits and utf-8 digits have the same byte representation, so that atoi works both on ascii and utf-8 strings.

Registration is quick, simple and atooi free. Originally Posted by harishisnow I am using: Review your favorite Linux distribution. Linxu up or log in Sign up using Google. You may wish to use the strtol function there is an example of using it in the man page. Originally Posted by harishisnow. This book contains many real life examples derived from the author’s experience as a Linux system and network administrator, trainer and consultant.

atoi.3p – Linux manual page

Join our community today! Stack Overflow works best with JavaScript enabled. Thanks everyone for the help.