Status: Assigned
Owner: [email protected]
CC: [email protected],  [email protected]
Labels: Priority-Low

New issue 1656 by [email protected]: Reconsider naming scheme of String::IsAsciiRepresentation and String::IsAsciiRepresentationUnderneath
http://code.google.com/p/v8/issues/detail?id=1656

As the comment for String::IsAsciiRepresentation says:
  // Returns whether this string has only ASCII chars, i.e. all of them can
  // be ASCII encoded.  This might be the case even if the string is
  // two-byte.  Such strings may appear when the embedder prefers
  // two-byte external representations even for ASCII data.

this method does not give any indication about the representation, but about the content. String::IsAsciiRepresentationUnderneath however returns the actual representation, taking into account that the underlying string (in cons and slices) may have different encoding.

On the other hand, String::IsTwoByteRepresentation and String::IsTwoByteRepresentationUnderneath should return the same, since there is no case where a cons string's underlying string is converted from twobyte to ascii, correct?

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to