Merge pull request #72 from VoiDeD/keyvalue-from-string

Implement StringToKeyValues.
This commit is contained in:
Asher Baker
2014-07-07 13:49:24 +01:00
4 changed files with 99 additions and 1 deletions
+12
View File
@@ -360,6 +360,18 @@ native bool:KeyValuesToFile(Handle:kv, const String:file[]);
*/
native bool:FileToKeyValues(Handle:kv, const String:file[]);
/**
* Converts a given string to a KeyValues tree. The string is read into
* the current postion of the tree.
*
* @param kv KeyValues Handle.
* @param buffer String buffer to load into the KeyValues.
* @param resourceName The resource name of the KeyValues, used for error tracking purposes.
* @return True on success, false otherwise.
* @error Invalid Handle.
*/
native bool:StringToKeyValues(Handle:kv, const String:buffer[], const String:resourceName[]="StringToKeyValues");
/**
* Sets whether or not the KeyValues parser will read escape sequences.
* For example, \n would be read as a literal newline. This defaults