Since it returns a "char *" which is a C type with no OOB length information, it needs to be null-terminated. New Strings are terminated now, but if you take a slice that ends before the original string ends, the substring isn't null-terminated. This is fine as long as it's a String which has a length(), but when you cast it to char* that information is lost.
Colin McCormack
Feature Request
Request For Enhancement
Public
|
Date: 2001-10-15 22:41:51 PDT Logged In: YES |
|
Date: 2001-01-13 21:46:15 PST Approach: I'll mod the (char*) casting operator to silently append a null |