IOS Foundation 字串例項分析

2021-06-07 10:18:39 字數 479 閱讀 7663

1,基本字串操作

- (void) basicstringmanipulation

2,字串字串操作

- (void) showcasesubstrings

//字串替代

nsstring

*replaced = [mystringstringbyreplacingoccurrencesofstring:

@" "

withstring:

@" * "];

nslog(@"%@", replaced);

}3,字串大小寫轉換

- (void) casechanges

4,字串比較

- (void) compareandtest

5,字串轉換為數字

- (void) converttonumbers

6,可變字串

- (void) mutablestrings;

IOS Foundation基礎知識

1.如果某個物件obj為nil,在執行obj的方法時 int i obj methodwhichreturnint 這時的 i 0 程式執行正常 如果執行函式返回值為結構體,如 cgpoint p obj getlocation 則p為undifined 2.object 的自省機制 iskindo...

iOS Foundation 框架基類

ios foundation 框架基類 太陽火神的漂亮人生 本文遵循 署名 非商業用途 保持一致 創作公用協議 太陽火神的漂亮人生 本部落格專注於 敏捷開發及移動和物聯裝置研究 ios android html5 arduino pcduino,基類 title topic date data ty...

IOS Foundation 集合型別例項分析

nsarray array nsarray arraywithobjects one two three nil nslog d array.count 訪問陣列的第乙個元素 nslog arrayobjectatindex 0 最後乙個元素位置為array.count 1 nslog array ...