enum Encoding {
UNKNOWN_ENCODING = 0x1,
TWO_BYTE_ENCODING = 0x0,
- ASCII_ENCODING = 0x4, // TODO(yangguo): deprecate this.
ONE_BYTE_ENCODING = 0x4
};
/**
NO_OPTIONS = 0,
HINT_MANY_WRITES_EXPECTED = 1,
NO_NULL_TERMINATION = 2,
- PRESERVE_ASCII_NULL = 4, // TODO(yangguo): deprecate this.
PRESERVE_ONE_BYTE_NULL = 4,
// Used by WriteUtf8 to replace orphan surrogate code units with the
// unicode replacement character. Needs to be set to guarantee valid UTF-8
*/
bool IsExternalOneByte() const;
- // TODO(yangguo): deprecate this.
- bool IsExternalAscii() const { return IsExternalOneByte(); }
-
class V8_EXPORT ExternalStringResourceBase { // NOLINT
public:
virtual ~ExternalStringResourceBase() {}
ExternalOneByteStringResource() {}
};
- typedef ExternalOneByteStringResource ExternalAsciiStringResource;
-
/**
* If the string is an external string, return the ExternalStringResourceBase
* regardless of the encoding, otherwise return NULL. The encoding of the
*/
const ExternalOneByteStringResource* GetExternalOneByteStringResource() const;
- // TODO(yangguo): deprecate this.
- const ExternalAsciiStringResource* GetExternalAsciiStringResource() const {
- return GetExternalOneByteStringResource();
- }
-
V8_INLINE static String* Cast(v8::Value* obj);
enum NewStringType {