共用方式為


tolower、 _tolower、 towlower、 _tolower_l、 _towlower_l

將字元轉換成小寫。

int tolower(
   int c 
);
int _tolower(
   int c 
);
int towlower(
   wint_t c 
);
int _tolower_l(
   int c,
   _locale_t locale 
);
int _towlower_l(
   wint_t c,
   _locale_t locale 
);

參數

  • [in] c
    要轉換的字元。

  • [in] locale
    若要使用的地區設定特性轉譯的地區設定。

傳回值

每個這些常式會將轉換一份c成小寫字母,如果轉換是可行的並傳回結果。 沒有保留代表錯誤發生的任何傳回的值。

備註

它是否可以與相關,這些常式的每一個可以轉換為小寫字母的給定的大寫字母。 大小寫轉換的towlower的地區設定而定。 在 [大小寫變成只為目前的地區設定相關的字元。 函式_l尾碼使用目前設定的地區設定。 有這些函式的版本_l後置字元做為參數的地區設定,所以使用,而不是目前設定的地區設定。 如需詳細資訊,請參閱 地區設定

為了讓_tolower來達到預期的結果, __isasciiisupper 必須同時傳回非零值。

泛用文字常式對應

TCHAR。H 常式

_UNICODE & 未定義的 _MBCS

定義的 _MBCS

定義 _unicode 之後

_totlower

tolower

_mbctolower

towlower

_totlower_l

_tolower_l

_mbctolower_l

_towlower_l

注意事項注意事項

_tolower_l與_towlower_l所沒有的地區設定相依性,並不是用來直接呼叫。只要是供內部使用_totlower_l。

需求

常式

所需的標頭

tolower

<ctype.h>

_tolower

<ctype.h>

towlower

<ctype.h> 或者 <wchar.h>

其他的相容性資訊,請參閱相容性在簡介中。

範例

此範例中的,請參閱函式

.NET Framework 對等用法

System::Char::ToLower

請參閱

參考

資料轉換

is,isw 常式

to 函式

地區設定

多位元組字元序列的轉譯工作