prg_string_posix_locale_begin()
摘要
将程序的 locale 设置为 POSIX/C 模式。
语法
prg_string_posix_locale_begin ()
| 参数 | 类型 | 说明 |
|---|---|---|
| 无参数 |
返回类型
char *
之前的 locale 字符串(在恢复原 locale 时与 prg_string_posix_locale_end() 配合使用)。
头文件
prg_string_funcs.h
详情
此函数会分配内存来保存之前的 locale,并返回指向该内存的指针。当需要以安全模式写入和解析用户不会编辑的文件时,使用此函数设置 locale。