Alan Campbell (entropyreduction) wrote:
> I'd have to reinvent the read and write ini-value api calls, 
> to get around the problem, and I'm not sure I want to do that 
> right at the moment.  

There's no need to. As a workaround, stindlpeter could simply
use the correct syntax to obtain his desired result. ;-)

The Ini plugin (and the inifile services in the Registry
plugin) work correctly regarding spaces at the start
and end of values.

You can use ini.set and ini.get to set and retrieve strings with 
starting and ending white space.

- Leading and trailing space is preserved if it's inside quotes.
- Also, the first and last double-quote in the value in the inifile
is removed when the value is read.
- Therefore, to have leading and trailing spaces (and literal
double-quote characters if you wish) which will be read by ini.get,
the inifile should look like this:
(without my end of line comments starting ;;)

[section1]
value1= text ;; will be read by ini.get as <text>
value2= " text " ;; will be read as < text >
value3= "" text "" ;; will be read as <" text ">

To write those strings use:
ini.set("c:\tests\test1.ini","section1","value1","text")
ini.set("c:\tests\test1.ini","section1","value2","'" text '"")
ini.set("c:\tests\test1.ini","section1","value3","'"'" text '"'"")
[ if you are using the new \ escape char,
replace each of those single quote chars with \ ]

Note; In the third parameter, the outside pair of quotes are needed
by (and consumed by) PowerPro and the Ini plugin, because it's
a literal string.

To test how ini.get sees those lines, use:
iniget2=ini.get("c:\tests\test1.ini","section1","value2")
clip.set(iniget2)
;; and paste into Notepad.







------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/JV_rlB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/power-pro/

<*> To unsubscribe from this group, send an email to:
     [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/
 

Reply via email to