iOS string processing notes (regular expression, Nsscanner Scan, Coreparse parser)

Source: Internet
Author: User
Tags locale

Turn from:


Search searching for substrings in a string

The most flexible approach

1 -(Nsrange) rangeofstring: (NSString *) astring options: (nsstringcompareoptions) Mask range: (nsrange) searchrange locale :(Nslocale *) locale
format string

3 methods

1 2 3 -initwithformat:-initwithformat:arguments: +stringwithformat:
integers

Can work at the same time in 32-bit and 64-bit

1 2 3 uint64_t p = 2305843009213693951; nsstring *s = [nsstring stringwithformat:@ "The ninth mersenne prime is  %llu ",  (Unsigned long long)  p];   "the ninth mersenne prime is 2305843009213693951"
Modifier D, I o, u, x, x
hh Signed Char unsigned char
H Short unsigned short
(none) Int unsigned int
L (ELL) Long unsigned long
J intmax_t uintmax_t
T ptrdiff_t
Z
size_t

Conversion rules

Related Article

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.