在PB中,ProfileString函数用于从一个INI文件中读取指定的键值。
语法:ProfileString(section, key, default, filename)
参数说明:
示例代码:
string ls_value
ls_value = ProfileString("Section1", "Key1", "Default", "C:\example.ini")
以上代码将从C:\example.ini文件中的Section1段落中读取Key1键的值,如果找不到该键值,将返回"Default"作为默认值。
注意:
亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>