мелочь
This commit is contained in:
@ -14,6 +14,8 @@
|
||||
#include <iostream>
|
||||
#include <fstream> // std::ifstream
|
||||
#include <sstream>
|
||||
#include <cwctype> // For std::towlower
|
||||
#include <algorithm>
|
||||
|
||||
#include "inifile.h"
|
||||
#include "stdTools.h"
|
||||
@ -374,6 +376,7 @@ JSON::JSON(std::wstring data)
|
||||
|
||||
Utility::CutBeforeWFirst(data, '"');
|
||||
std::wstring ident = Utility::CutBeforeWFirst(data, '"');
|
||||
std::transform(ident.begin(), ident.end(), ident.begin(), ::tolower);
|
||||
std::wstring value;
|
||||
|
||||
size_t startpos = data.find_first_not_of(L" :\t\f\n\r");
|
||||
@ -438,9 +441,11 @@ std::string JSON::ReadAString(std::wstring Ident,std::wstring Default)
|
||||
//------------------------------------------------------------------------------
|
||||
std::wstring JSON::ReadString(std::wstring Ident,std::wstring Default)
|
||||
{
|
||||
std::transform(Ident.begin(), Ident.end(), Ident.begin(), ::tolower);
|
||||
|
||||
TIniWStruct* inistr = first;
|
||||
while (inistr!=NULL)
|
||||
{
|
||||
{
|
||||
if (inistr->ident==Ident)
|
||||
{
|
||||
return inistr->value;
|
||||
|
||||
Reference in New Issue
Block a user