tolower

    11熱度

    3回答

    在C中,字符串是字符數組(char *),字符通常存儲在char中。我注意到libC中的一些函數採用了作爲整數而不是char的參數。 舉例來說,讓我們看看toupper()和tolower()這兩個函數都使用int。該名男子網頁顯示: 如果c不是unsigned char值,或EOF,這些 函數的行爲是不確定的。 我的猜測是有int,toupper和tolower能夠應付unsigned char

    2熱度

    3回答

    試圖獲得此更改解析的字符串段的第一個字母的情況。因此,如果用戶在txtName中輸入「JOHN WAYNE DOE」,那麼它將顯示「John Wayne Doe」 我按照它在書中顯示的方式輸入它,但消息框顯示解析的字符串,但是它在上面的示例中被輸入返回的是「JOHN WAYNE DOE」 我認爲這是一個邏輯錯誤,因爲我知道這麼做很多,我不知道我犯了什麼錯誤。 Dim name As String

    0熱度

    1回答

    所以我見過很多類似的問題,但沒有答案正在解決我的問題。有人可以解釋爲什麼這代碼: string LinkedListByName::toLower(string stringToConvert){ return std::transform(stringToConvert.begin(), stringToConvert.end(), stringToConvert.begin(), ::to

    -1熱度

    2回答

    在第三個函數中,我得到const char * it = s的語法錯誤;當我嘗試編譯時。我的朋友得到了這個程序來處理他的編譯器,但是我使用的是Visual Studio,它不會編譯。任何和所有的幫助將非常感謝! #include <stdio.h> #include <stdlib.h> #include <ctype.h> #include <string.h> //Declarin

    4熱度

    3回答

    我有一個char foo[SIZE]; //(string) ,並使用正確的%s有inputed它(在它printfs正確的輸入),但現在想將其設置爲小寫。所以,我嘗試使用 if (isupper(*foo)) *foo=tolower(*foo); 即當我這樣做: printf("%s" foo); //I get the same text with upper case 的

    2熱度

    1回答

    我寫了這個程序,試圖理解C稍微好一點。它可以工作,但由於某種原因,在正確輸出之前打印(null)。我的代碼: /* This program will take a string input input from the keyboard, convert the string into all lowercase characters, then print the result.*/ #

    0熱度

    2回答

    我需要比較兩個字符串是否相等(不區分大小寫),但我的實現在編譯時返回了很多警告。 我的實現: //The word array will contain any number of strings of varying lengths //string is the word to compare to char **wordArray, char*string; int i, sizeO

    0熱度

    1回答

    我試圖追蹤通過這個問題,無法弄清楚星是如何通過while循環並存儲在數組中。 *由於託管而被存儲爲8?如果任何人都可以請通過第一個循環 - 第二循環,請我永遠感激。 #include <stdio.h> #include <ctype.h> int main() { int index, freq[26], c, stars, maxfreq; for(index=0

    0熱度

    1回答

    我試圖讓在上述對象中的每個鍵的小寫值。 for (each in {'foo':'bar','bar':'foo'}) { console.log(typeof each, each.toLowercase()); } 我得到的錯誤是Object foo has no method 'toLowercase',但typeof each回報'string'

    1熱度

    2回答

    我想在我的href標記的URL更改爲低,這裏是我的代碼: <a href="{$url}{umbraco.library:NiceUrl(@id)}/{$AppendedID}/"> 我使用Exslt.ExsltStrings:lowercase(node-set)沒有快樂,因爲這會引發錯誤嘗試。有沒有人有什麼建議?