📄 nl_langinfo.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><!-- Copyright 1997 The Open Group, All Rights Reserved --><title>nl_langinfo</title></head><body bgcolor=white><center><font size=2>The Single UNIX ® Specification, Version 2<br>Copyright © 1997 The Open Group</font></center><hr size=2 noshade><h4><a name = "tag_000_007_901"> </a>NAME</h4><blockquote>nl_langinfo - language information</blockquote><h4><a name = "tag_000_007_902"> </a>SYNOPSIS</h4><blockquote><pre><code>#include <<a href="langinfo.h.html">langinfo.h</a>>char *nl_langinfo(nl_item <i>item</i>);</code></pre></blockquote><h4><a name = "tag_000_007_903"> </a>DESCRIPTION</h4><blockquote>The<i>nl_langinfo()</i>functionreturns a pointer to a stringcontaining information relevant to the particularlanguage or cultural area defined in the program's locale(see<i><a href="langinfo.h.html"><langinfo.h></a></i>).The manifest constant names and values of<i>item</i>are defined in<i><a href="langinfo.h.html"><langinfo.h></a></i>.For example:<pre><code>nl_langinfo (ABDAY_1)</code></pre><p>would return a pointer to the string "Dom" if the identifiedlanguage was Portuguese, and "Sun" if the identified languagewas English.<p>Calls to<i><a href="setlocale.html">setlocale()</a></i>with a category corresponding to the category of<i>item</i>(see<i><a href="langinfo.h.html"><langinfo.h></a></i>),or to the category LC_ALL, mayoverwrite the array pointed to by the return value.<p>This interface need not be reentrant.</blockquote><h4><a name = "tag_000_007_904"> </a>RETURN VALUE</h4><blockquote>In a locale where<i>langinfo</i>data is not defined,<i>nl_langinfo()</i>returns a pointer to the corresponding string in the POSIX locale.In all locales,<i>nl_langinfo()</i>returns a pointer to an empty string if<i>item</i>contains an invalid setting.<p>This pointer may point to static data that may be overwritten on thenext call.</blockquote><h4><a name = "tag_000_007_905"> </a>ERRORS</h4><blockquote>No errors are defined.</blockquote><h4><a name = "tag_000_007_906"> </a>EXAMPLES</h4><blockquote>None.</blockquote><h4><a name = "tag_000_007_907"> </a>APPLICATION USAGE</h4><blockquote>The array pointed to by the return value should not be modifiedby the program, but may be modified by further calls to<i>nl_langinfo()</i>.</blockquote><h4><a name = "tag_000_007_908"> </a>FUTURE DIRECTIONS</h4><blockquote>None.</blockquote><h4><a name = "tag_000_007_909"> </a>SEE ALSO</h4><blockquote><i><a href="setlocale.html">setlocale()</a></i>,<i><a href="langinfo.h.html"><langinfo.h></a></i>,<i><a href="nl_types.h.html"><nl_types.h></a></i>,the <b>XBD</b> specification, <a href="../xbd/locale.html"><b>Locale</b> </a>.</blockquote><hr size=2 noshade><center><font size=2>UNIX ® is a registered Trademark of The Open Group.<br>Copyright © 1997 The Open Group<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]</font></center><hr size=2 noshade></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -