C + + string conversions

Source: Internet
Author: User

character classification functions convert character function strings to numeric values need to be clear plus # include<ctype.h>function Islower Tests whether lowercase letters are returned nonzero, otherwise returns 0. Isupper tests whether the uppercase letter is returned nonzero, otherwise returns 0. isalpha test whether the letter, Returns nonzero, otherwise 0. isalnum tests whether the number is returned nonzero, otherwise returns 0. The Iscntrl test controls whether the character is returned nonzero, otherwise returns 0. Isprint tests whether the printable character is returned nonzero, otherwise returns 0. The Isgraph tests whether the printable character, without spaces, is returned nonzero, otherwise 0 is returned. IsDigit whether the test is a character'0'~'9', which is nonzero, returns 0 otherwise. Isblank tests whether the standard white space character is returned nonzero, otherwise returns 0. The Isspace tests whether the whitespace character is returned nonzero, otherwise returns 0. ISPUNCT tests whether punctuation is returned nonzero, otherwise returns 0. Convert case toupper convert lowercase to uppercase if not character returns the original value ToLower convert uppercase to lowercase if not character returns the original value string converted to a value need to add # include<stdlib.h>atof Convert from string to double type atoi from string tointtype Atol convert from string toLongtype Atoll convert from string toLong LongType Example:

C + + string conversions

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.