MCPcopy Create free account
hub / github.com/NativeScript/android / ToString

Method ToString

test-app/runtime/src/main/cpp/Util.h:31–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29 static std::vector<uint16_t> ToVector(const std::string &value);
30
31 inline static std::string ToString(v8::Isolate *isolate, const v8::Local<v8::Value> &value) {
32 if (value.IsEmpty()) {
33 return std::string();
34 }
35
36 if (value->IsStringObject()) {
37 v8::Local<v8::String> obj = value.As<v8::StringObject>()->ValueOf();
38 return ToString(isolate, obj);
39 }
40
41 v8::String::Utf8Value result(isolate, value);
42
43 const char *val = *result;
44 if (val == nullptr) {
45 return std::string();
46 }
47
48 return std::string(*result, result.length());
49 }
50
51};
52

Callers 15

ConvertToJavaLongMethod · 0.45
MarkAsLongCallbackMethod · 0.45
MarkAsByteCallbackMethod · 0.45
MarkAsShortCallbackMethod · 0.45
MarkAsCharCallbackMethod · 0.45
LogMethodCallbackMethod · 0.45
ConvertArgMethod · 0.45
SetArrayElementMethod · 0.45
ConvertArgMethod · 0.45

Calls 3

ToStringFunction · 0.85
IsEmptyMethod · 0.45
lengthMethod · 0.45

Tested by 2

TestMethod · 0.36