W3C home > Mailing lists > Public > www-svg@w3.org > February 2008

getSubStringLength() can't address the last character of a string?

From: Ian Hickson <ian@hixie.ch>
Date: Fri, 22 Feb 2008 01:59:50 +0000 (UTC)
To: www-svg@w3.org
Message-ID: <Pine.LNX.4.62.0802220154560.6407@hixie.dreamhostps.com>


Is it intentional that getSubStringLength() can't get the advance of the 
last character of a string?

According to SVG 1.1, getSubStringLength() raises an INDEX_SIZE_ERR 
exception "if the charnum is negative or if charnum+nchars is greater than 
or equal to the number of characters at this node", but it seems like 
"charnum+nchars" being equal to the number of characters should be fine.

Is this an error, or intentional?

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Friday, 22 February 2008 02:00:08 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:38 GMT