Struct v8::value::String
[−]
[src]
pub struct String(_, _);
A JavaScript string value (ECMA-262, 4.3.17).
Methods
impl String
[src]
fn empty(isolate: &Isolate) -> String
fn from_str(isolate: &Isolate, str: &str) -> String
Allocates a new string from UTF-8 data.
fn internalized_from_str(isolate: &Isolate, str: &str) -> String
Allocates a new internalized string from UTF-8 data.
fn length(&self) -> u32
Returns the number of characters in this string.
fn utf8_length(&self) -> u32
Returns the number of bytes in the UTF-8 encoded representation of this string.
fn is_one_byte(&self) -> bool
Returns whether this string is known to contain only one byte data.
Does not read the string.
False negatives are possible.
fn contains_only_one_byte(&self) -> bool
Returns whether this string contain only one byte data.
Will read the entire string in some cases.
fn value(&self) -> String
unsafe fn from_raw(isolate: &Isolate, raw: StringRef) -> String
Creates a string from a set of raw pointers.
fn as_raw(&self) -> StringRef
Returns the underlying raw pointer behind this string.
Methods from Deref<Target=Name>
fn get_identity_hash(&self) -> u32
Returns the identity hash for this object.
The current implementation uses an inline property on the object to store the identity hash.
The return value will never be 0. Also, it is not guaranteed to be unique.
fn as_raw(&self) -> NameRef
Returns the underlying raw pointer behind this primitive.
Trait Implementations
impl Debug for String
[src]
impl Deref for String
[src]
type Target = Name
The resulting type after dereferencing
fn deref(&self) -> &Self::Target
The method called to dereference a value
impl Clone for String
[src]
fn clone(&self) -> String
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more