| Issue 129: | StringTools.fastCodeAt error | |
| 1 person starred this issue and may be notified of changes. | Back to list |
The following should return "true" but instead show an error dialog :
StringTools.isEOF( StringTools.fastCodeAt("abc",3) );
Best,
Nicolas
Jul 19, 2011
What do you think if I just return 0 if __s==null ? That would at least let "IsEOF" work.
Jul 20, 2011
Ok - just return 0 when out of bounds. Seems the most useful thing.
Jul 20, 2011
(No comment was entered for this change.)
Status:
Fixed
|
Proposed implementation for cca in hxString.h : inline int cca(int inPos) const { #ifdef HXCPP_DEBUG if (!__s) hx::CriticalError(HX_CSTRING("cca - Null String Reference")); #endif if ((unsigned)inPos >= length) return 0; return __s[inPos]; }