Created
April 13, 2011 19:09
-
-
Save davejlong/918179 to your computer and use it in GitHub Desktop.
Parses an INI file into a structure
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function parseINI(string codefile) void{ | |
var i = ''; | |
var codes = structNew(); | |
local.sections = getProfileSections(getCodeFile()); | |
for(local.section IN local.sections){ | |
codes[local.section] = structNew(); | |
local.keys = local.sections[local.section]; | |
for(i=1;i LTE listLen(local.keys);i++){ | |
codes[local.section][listGetAt(local.keys,i)] = getProfileString(getCodeFile(),local.section,listGetAt(local.keys,i)); | |
} | |
} | |
return codes; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment