我有以下日期:獲取某些子
"Friday, January 31",
"Wednesday, February 12",
"Monday, February 17",
"Wednesday, March 5",
我想建立一個字符串函數,其中我總是給出的數字:
31
12
17
5
我開始用這個功能:
String strCheck = suspendedDates[i];
int pos = strCheck.length();
int pos2 = strCheck.indexOf(" ");
我堅持現在,因爲它是如何知道哪些" "
是什麼呢?
有人可以幫助我的功能。
它將採取第一個,如文檔所述。 _「返回指定子字符串第一次出現的該字符串中的索引。「_ –