|
Leading Spaces for get_config_string() |
ZoriaRPG
Member #16,714
July 2017
|
Is there any way to put a string in a config file, with leading spaces, that get_config_string() will parse? get_config_string() ignores whitespace, and from what I can see, it reads escape characters as raw text, so, '/t' is read in as a slash and a 't' inside the string, rather than as proper escape sequence characters. Can I use esc sequences somehow, or otherwise insert leading spaces, or tabs, into the string? (The issue is this: str = /t string //produces a c.string of "/t string", not a char array with '/t' as the first char. I could of course, reprocess the string and manually convert esc sequences into char, but that's a huge pain in the arse, so if there's a simpler way, I'd prefer it.
|
Elias
Member #358
May 2000
|
I don't know if that helps, but escape sequences would use a backslash not a slash. -- |
Edgar Reynaldo
Major Reynaldo
May 2007
|
I have a config file reader and writer, but it strips leading and trailing whitespace off of values. Why do you want escape characters in a config file? My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
ZoriaRPG
Member #16,714
July 2017
|
Elias said: I don't know if that helps, but escape sequences would use a backslash not a slash.
I think that was just an error in my post here, but I'll double-check. I could just be a moron. Edgar Reynaldo said: I have a config file reader and writer, but it strips leading and trailing whitespace off of values. Why do you want escape characters in a config file? Have a look at the ZQuest Module format: http://timelord.insomnia247.nl/zc-dev/2.55/modules/classic/classic.zmod
|
|