Issue 129: StringTools.fastCodeAt error
Status:  Fixed
Owner: ----
Closed:  Jul 2011
Reported by ncanna...@gmail.com, Jul 16, 2011
The following should return "true" but instead show an error dialog :

StringTools.isEOF( StringTools.fastCodeAt("abc",3) );

Best,
Nicolas
Jul 16, 2011
#1 ncanna...@gmail.com
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];
	}
Jul 19, 2011
Project Member #2 gameh...@gmail.com
What do you think if I just return 0 if __s==null ?  That would at least let "IsEOF" work.
Jul 20, 2011
Project Member #3 gameh...@gmail.com
Ok - just return 0 when out of bounds.  Seems the most useful thing.
Jul 20, 2011
Project Member #4 gameh...@gmail.com
(No comment was entered for this change.)
Status: Fixed