当前位置:网站首页>Objective-C string class, array class
Objective-C string class, array class
2022-07-04 03:34:00 【Zyryck】
String class :
NSString* str1 = @"dancer";
NSString* str2 = [[NSString alloc] initWithFormat:@"%d beijing",1949];
NSString* str3 = [NSString stringWithFormat:@"%ld beijing",1948];
NSUInteger len = str1.length;
// Calculate the length
// notes : One Chinese character and one length
NSLog(@"%lu",len);
// More equal
BOOL result = [str1 isEqualTo:str2];
if(result){
NSLog(@" equal ");
}else{
NSLog(@" It's not equal ");
}Array class :
//NSMutableArray Variable array
NSMutableArray* array = [[NSMutableArray alloc]init];
// Arrays can hold objects of any type
// Additions and deletions
[array addObject:@"obj1"];
// Delete by object
[array removeObject:@"obj1"];
// Delete... By index
[array removeObjectAtIndex:0];
// Accessing array elements
NSString* item1 = array[0];边栏推荐
- Command Execution Vulnerability - command execution - vulnerability sites - code injection - vulnerability exploitation - joint execution - bypass (spaces, keyword filtering, variable bypass) - two ex
- 潘多拉 IOT 开发板学习(HAL 库)—— 实验6 独立看门狗实验(学习笔记)
- 1day vulnerability pushback skills practice (3)
- Easy to win insert sort
- New year's first race, submit bug reward more!
- Development of digital collection trading platform development of digital collection platform
- 機器學習基礎:用 Lasso 做特征選擇
- Leetcode51.n queen
- 基于PHP的轻量企业销售管理系统
- Contest3145 - the 37th game of 2021 freshman individual training match_ J: Eat radish
猜你喜欢

PID of sunflower classic

Dare to climb here, you're not far from prison, reptile reverse actual combat case

Summary of Chinese remainder theorem

微信公众号网页授权

There is no need to authorize the automatic dream weaving collection plug-in for dream weaving collection

This function has none of DETERMINISTIC, NO SQL..... (you *might* want to use the less safe log_bin_t

The 37 year old programmer was laid off, and he didn't find a job for 120 days. He had no choice but to go to a small company. As a result, he was confused

基于PHP的轻量企业销售管理系统

Want to do something in production? Then try these redis commands

Package details_ Four access control characters_ Two details of protected
随机推荐
Don't disagree, this is the most powerful "language" of the Internet
96% of the collected traffic is prevented by bubble mart of cloud hosting
The difference between MCU serial communication and parallel communication and the understanding of UART
How much does it cost to open a futures account in China? Where is it safe to open an account at present?
Rhcsa day 2
Contest3145 - the 37th game of 2021 freshman individual training match_ F: Smallest ball
JSON string conversion in unity
Cache general management class + cache httpcontext Current. Cache and httpruntime Differences between caches
super_ Subclass object memory structure_ Inheritance tree traceability
[Wu Enda deep learning] beginner learning record 3 (regularization / error reduction)
PID of sunflower classic
[PaddleSeg 源码阅读] PaddleSeg Transform 的 Normalize操作
Stm32bug [the project references devices, files or libraries that are not installed appear in keilmdk]
Have you entered the workplace since the first 00???
Package details_ Four access control characters_ Two details of protected
[development team follows] API specification
Development of digital collection trading platform development of digital collection platform
PMP 考試常見工具與技術點總結
JVM family -- heap analysis
Hospital network planning and design document based on GLBP protocol + application form + task statement + opening report + interim examination + literature review + PPT + weekly progress + network to