Lines Matching defs:String
114 class String;
225 * incompatible handles, for instance from a Handle<String> to a
228 * Handle<String> to a variable declared as Handle<Value>, is legal
229 * because String is a subclass of Value.
235 * handles. For example, converting from a Handle<String> to a
361 * handles. For example, converting from a Handle<String> to a
409 friend class String;
1007 static ScriptData* PreCompile(Handle<String> source);
1082 static Local<Script> New(Handle<String> source,
1085 Handle<String> script_data = Handle<String>());
1089 * object (typically a string) as the script's origin.
1092 * \param file_name file name object (typically a string) to be used
1097 static Local<Script> New(Handle<String> source,
1116 static Local<Script> Compile(Handle<String> source,
1119 Handle<String> script_data = Handle<String>());
1123 * object (typically a string) as the script's origin.
1134 static Local<Script> Compile(Handle<String> source,
1136 Handle<String> script_data = Handle<String>());
1162 void SetData(Handle<String> data);
1184 Local<String> Get() const;
1185 Local<String> GetSourceLine() const;
1241 // TODO(1245381): Print to a string instead of on a FILE.
1342 Local<String> GetScriptName() const;
1347 * is undefined and its source ends with //# sourceURL=... string or
1348 * deprecated //@ sourceURL=... string.
1350 Local<String> GetScriptNameOrSourceURL() const;
1355 Local<String> GetFunctionName() const;
1377 * Tries to parse the string |json_string| and returns it as value if
1380 * \param json_string The string to parse.
1383 static Local<Value> Parse(Local<String> json_string);
1418 * Returns true if this value is an instance of the String type.
1485 * Returns true if this value is a String object.
1586 Local<String> ToString() const;
1587 Local<String> ToDetailString() const;
1594 * Attempts to convert a string to an array index.
1642 * A JavaScript string value (ECMA-262, 4.3.17).
1644 class V8_EXPORT String : public Primitive {
1653 * Returns the number of characters in this string.
1659 * representation of this string.
1664 * Returns whether this string is known to contain only one byte data.
1665 * Does not read the string.
1671 * Returns whether this string contain only one byte data.
1672 * Will read the entire string in some cases.
1677 * Write the contents of the string to an external buffer.
1679 * enough to hold the entire string and NULL terminator. Copies
1680 * the contents of the string and the NULL terminator into the
1689 * \param buffer The buffer into which the string will be copied.
1690 * \param start The starting position within the string at which
1692 * \param length The number of characters to copy from the string. For
1725 * A zero length string.
1727 static v8::Local<v8::String> Empty();
1728 V8_INLINE static v8::Local<v8::String> Empty(Isolate* isolate);
1731 * Returns true if the string is external
1736 * Returns true if the string is both external and ASCII
1748 * Internally V8 will call this Dispose method when the external string
1751 * control how allocated external string resources are disposed.
1764 * An ExternalStringResource is a wrapper around a two-byte string
1767 * buffer. Note that the string data must be immutable.
1779 * The string data from the underlying buffer.
1784 * The length of the string. That is, the number of two-byte characters.
1794 * string buffer that resides outside V8's heap. Implement an
1796 * underlying buffer. Note that the string data must be immutable
1800 * Use String::New or convert to 16 bit data for non-ASCII.
1811 /** The string data from the underlying buffer.*/
1813 /** The number of ASCII characters in the string.*/
1822 * If the string is an external string, return the ExternalStringResourceBase
1824 * string is returned in encoding_out.
1830 * Get the ExternalStringResource for an external string. Returns
1836 * Get the ExternalAsciiStringResource for an external ASCII string.
1841 V8_INLINE static String* Cast(v8::Value* obj);
1844 * Allocates a new string from either UTF-8 encoded or ASCII data.
1850 V8_INLINE static Local<String> New(const char* data, int length = -1));
1852 /** Allocates a new string from 16-bit character codes.*/
1855 V8_INLINE static Local<String> New(
1859 * Creates an internalized string (historically called a "symbol",
1864 V8_INLINE static Local<String> NewSymbol(
1871 /** Allocates a new string from UTF-8 data.*/
1872 static Local<String> NewFromUtf8(Isolate* isolate,
1877 /** Allocates a new string from Latin-1 data.*/
1878 static Local<String> NewFromOneByte(
1884 /** Allocates a new string from UTF-16 data.*/
1885 static Local<String> NewFromTwoByte(
1892 * Creates a new string by concatenating the left and the right strings
1895 static Local<String> Concat(Handle<String> left, Handle<String> right);
1898 * Creates a new external string using the data defined in the given
1899 * resource. When the external string is no longer live on V8's heap the
1903 * destructor of the external string resource.
1905 static Local<String> NewExternal(Isolate* isolate,
1907 V8_DEPRECATED("Will be removed", static Local<String> NewExternal(
1911 * Associate an external string resource with this string by transforming it
1912 * in place so that existing references to this string in the JavaScript heap
1913 * will use the external string resource. The external string resource's
1914 * character contents need to be equivalent to this string.
1915 * Returns true if the string has been changed to be an external string.
1916 * The string is not modified if the operation fails. See NewExternal for
1922 * Creates a new external string using the ASCII data defined in the given
1923 * resource. When the external string is no longer live on V8's heap the
1927 * destructor of the external string resource.
1929 static Local<String> NewExternal(Isolate* isolate,
1931 V8_DEPRECATED("Will be removed", static Local<String> NewExternal(
1935 * Associate an external string resource with this string by transforming it
1936 * in place so that existing references to this string in the JavaScript heap
1937 * will use the external string resource. The external string resource's
1938 * character contents need to be equivalent to this string.
1939 * Returns true if the string has been changed to be an external string.
1940 * The string is not modified if the operation fails. See NewExternal for
1946 * Returns true if this string can be made external.
1950 /** Creates an undetectable string from the supplied ASCII or UTF-8 data.*/
1953 V8_INLINE static Local<String> NewUndetectable(const char* data,
1956 /** Creates an undetectable string from the supplied 16-bit character codes.*/
1959 V8_INLINE static Local<String> NewUndetectable(const uint16_t* data,
1964 * you want to print the object. If conversion to a string fails
1986 * Converts an object to an ASCII string.
1988 * If conversion to a string fails (eg. due to an exception in the toString()
2010 * Converts an object to a two-byte string.
2011 * If conversion to a string fails (eg. due to an exception in the toString()
2046 // Returns the print name string of the symbol, or undefined if none.
2067 // Returns the print name string of the private symbol, or undefined if none.
2162 Local<String> property,
2167 Local<String> property,
2239 bool SetAccessor(Handle<String> name,
2247 bool SetDeclaredAccessor(Local<String> name,
2303 Local<String> ObjectProtoToString();
2314 Local<String> GetConstructorName();
2340 bool HasOwnProperty(Handle<String> key);
2341 bool HasRealNamedProperty(Handle<String> key);
2343 bool HasRealNamedCallbackProperty(Handle<String> key);
2349 Local<Value> GetRealNamedPropertyInPrototypeChain(Handle<String> key);
2356 Local<Value> GetRealNamedProperty(Handle<String> key);
2386 bool SetHiddenValue(Handle<String> key, Handle<Value> value);
2387 Local<Value> GetHiddenValue(Handle<String> key);
2388 bool DeleteHiddenValue(Handle<String> key);
2625 void SetName(Handle<String> name);
3110 * A String object (ECMA-262, 4.3.18).
3114 static Local<Value> New(Handle<String> value);
3118 Local<String> StringValue() const) { return ValueOf(); }
3121 * Returns the String held by the object.
3123 Local<String> ValueOf() const;
3174 * Creates a regular expression from the given pattern string and
3179 * RegExp::New(v8::String::New("foo"),
3183 static Local<RegExp> New(Handle<String> pattern, Flags flags);
3186 * Returns the value of the source property: a string representing
3189 Local<String> GetSource() const;
3227 void Set(Handle<String> name, Handle<Data> value,
3234 Local<String> name,
3267 void SetNativeDataProperty(Local<String> name,
3278 bool SetDeclaredAccessor(Local<String> name,
3298 Local<String> property,
3307 Local<String> property,
3318 Local<String> property,
3328 Local<String> property,
3557 void SetClassName(Handle<String> name);
3643 void SetAccessor(Handle<String> name,
3869 : public String::ExternalAsciiStringResource {
3896 v8::Isolate* isolate, v8::Handle<v8::String> name) {
3906 v8::Handle<v8::String> name)) {
3912 const String::ExternalAsciiStringResource* source() const {
4037 static Local<Value> RangeError(Handle<String> message);
4038 static Local<Value> ReferenceError(Handle<String> message);
4039 static Local<Value> SyntaxError(Handle<String> message);
4040 static Local<Value> TypeError(Handle<String> message);
4041 static Local<Value> Error(Handle<String> message);
4509 // Name of the object associated with the code, note that the string is not
4561 virtual void VisitExternalString(Handle<String> string) {}
4688 * Sets V8 flags from a string.
4699 /** Get the version string. */
5295 void SetErrorMessageForCodeGenerationFromStrings(Handle<String> message);
5750 V8_INLINE static bool CanCastToHeapObject(String* o) { return true; }
6072 TYPE_CHECK(T, String);
6195 Set(v8::String::NewFromUtf8(isolate, name), value);
6239 String* String::Cast(v8::Value* value) {
6243 return static_cast<String*>(value);
6247 Local<String> String::Empty(Isolate* isolate) {
6252 return Local<String>(reinterpret_cast<String*>(slot));
6256 Local<String> String::New(const char* data, int length) {
6261 Local<String> String::New(const uint16_t* data, int length) {
6266 Local<String> String::NewSymbol(const char* data, int length) {
6271 Local<String> String::NewUndetectable(const char* data, int length) {
6276 Local<String> String::NewUndetectable(const uint16_t* data, int length) {
6282 String::ExternalStringResource* String::GetExternalStringResource() const {
6285 O* obj = *reinterpret_cast<O**>(const_cast<String*>(this));
6286 String::ExternalStringResource* result;
6289 result = reinterpret_cast<String::ExternalStringResource*>(value);
6300 String::ExternalStringResourceBase* String::GetExternalStringResourceBase(
6301 String::Encoding* encoding_out) const {
6304 O* obj = *reinterpret_cast<O**>(const_cast<String*>(this));