📄 setlocale.html
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head> <meta name="generator" content= "HTML Tidy for Linux/x86 (vers 1 September 2005), see www.w3.org"> <title>setlocale</title> <link href="../cppreference.css" rel="stylesheet" type="text/css"></head><body><table> <tr> <td> <div class="body-content"> <div class="header-box"> <a href="../index.html">cppreference.com</a> > <a href= "index.html">Standard C Date & Time</a> > <a href= "setlocale.html">setlocale</a> </div> <div class="name-format"> setlocale </div> <div class="syntax-name-format"> Syntax: </div> <pre class="syntax-box"> #include <locale.h> char *setlocale( int category, const char * locale );</pre> <p>The setlocale() function is used to set and retrieve the current locale. If <em>locale</em> is <strong>NULL</strong>, the current locale is returned. Otherwise, <em>locale</em> is used to set the locale for the given <em>category</em>.</p> <p><em>category</em> can have the following values:</p> <table class="code-table"> <tr> <th class="code-table-th">Value</th> <th class="code-table-th">Description</th> </tr> <tr> <td class="code-table-td">LC_ALL</td> <td class="code-table-td">All of the locale</td> </tr> <tr> <td class="code-table-td">LC_TIME</td> <td class="code-table-td">Date and time formatting</td> </tr> <tr> <td class="code-table-td">LC_NUMERIC</td> <td class="code-table-td">Number formatting</td> </tr> <tr> <td class="code-table-td">LC_COLLATE</td> <td class="code-table-td">String collation and regular expression matching</td> </tr> <tr> <td class="code-table-td">LC_C<a href= "../containers.html">TYPE</a></td> <td class="code-table-td">Regular expression matching, conversion, case-sensitive comparison, wide character functions, and character classification.</td> </tr> <tr> <td class="code-table-td">LC_MONETARY</td> <td class="code-table-td">For monetary formatting</td> </tr> <tr> <td class="code-table-td">LC_MESSAGES</td> <td class="code-table-td">For natural language messages</td> </tr> </table> <div class="related-name-format"> Related topics: </div> <div class="related-content"> (Standard C String and Character) <a href= "../stdstring/strcoll.html">strcoll</a> </div> </div> </td> </tr> </table></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -