我試圖在c中將char *轉換爲大寫字母,但功能toupper()在此處不起作用。 我試圖得到temp的值的名稱,名稱是冒號前的任何東西,在這種情況下它是「測試」,然後我想充分利用名稱。 void func(char * temp) {
// where temp is a char * containing the string "Test:Case1"
char * name;
nam
我需要使用strtok函數來分析某些字符串中的每個單詞。 我寫了這樣的代碼: char *token;
token=strtok(string,symbol);
while(token!=NULL){
functionX(token); //this is a function that anlayze the token
token=strtok(NULL,symbol)