IOS--DAY02---String

Source: Internet
Author: User

Common string handling functions provided by ANSI C

  • int isalnum (int ch): Whether it is a letter or a number
  • int isalpha (int ch): Whether it is a letter
  • int Iscntrl (int ch): is the control character
  • int isdigit (int ch): is the control number
  • int isgraph (int ch): Whether it is a printable character
  • int islower (int ch) is lowercase
  • int isupper (int ch) is uppercase
  • whether int isprint (int ch) is a printable character including spaces
  • int ispunct (int ch) determines whether the punctuation character
  • int isspace (int ch) Determines whether it is a white space character (including spaces, TAB key, line break)
  • int isdigit (int ch) to determine whether it is a 16 binary character
  • char * STRCAT (char* Str1,char * str2): Adds str2 to the back of STR1, returns the appended string
  • char * STRCHR (char * str, int ch): Returns the position of CH for the first time in Str
  • int strcmp (char * str1, char * str2): Compares the size of two strings, if STR1>STR2, returns a positive number, equals returns 0, less than the return negative value
  • char * strcpy (char*s tr1,char* str2,[int n]): Copies the first n characters of the STR2 string to the back of str1. If no parameter n is specified, all str2 characters are copied to the str1. (The length of the str1 must be large enough)
  • unsigned int strlen (char* str): Returns the number of characters in a string (not including the end flag)
  • char * STRSTR (char* str1,char* str2): Returns the position where str2 appears in str1.
  • int tolower (int ch): return ch corresponding lowercase letter
  • int toupper (int ch): Returns the uppercase letter of CH

--------------------------------------------------------------------------------------------

OC provides a powerful string (@ ""), string is NSString object, we should try to use OC string

IOS--DAY02---String

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.