Flutter Engine Uber Docs
Docs for the entire Flutter Engine repo.
 
Loading...
Searching...
No Matches
string.cc File Reference
#include <string>
#include "flutter/skwasm/export.h"
#include "flutter/skwasm/live_objects.h"
#include "third_party/skia/include/core/SkString.h"

Go to the source code of this file.

Functions

SKWASM_EXPORT SkString * skString_allocate (size_t length)
 
SKWASM_EXPORT char * skString_getData (SkString *string)
 
SKWASM_EXPORT int skString_getLength (SkString *string)
 
SKWASM_EXPORT void skString_free (SkString *string)
 
SKWASM_EXPORT std::u16string * skString16_allocate (size_t length)
 
SKWASM_EXPORT char16_t * skString16_getData (std::u16string *string)
 
SKWASM_EXPORT void skString16_free (std::u16string *string)
 

Function Documentation

◆ skString16_allocate()

SKWASM_EXPORT std::u16string * skString16_allocate ( size_t  length)

Definition at line 29 of file string.cc.

29 {
31 std::u16string* string = new std::u16string();
32 string->resize(length);
33 return string;
34}
size_t length
uint32_t live_string16_count

References length, and Skwasm::live_string16_count.

◆ skString16_free()

SKWASM_EXPORT void skString16_free ( std::u16string *  string)

Definition at line 40 of file string.cc.

40 {
42 delete string;
43}

References Skwasm::live_string16_count.

◆ skString16_getData()

SKWASM_EXPORT char16_t * skString16_getData ( std::u16string *  string)

Definition at line 36 of file string.cc.

36 {
37 return string->data();
38}

◆ skString_allocate()

SKWASM_EXPORT SkString * skString_allocate ( size_t  length)

Definition at line 11 of file string.cc.

11 {
13 return new SkString(length);
14}
uint32_t live_string_count

References length, and Skwasm::live_string_count.

◆ skString_free()

SKWASM_EXPORT void skString_free ( SkString *  string)

Definition at line 24 of file string.cc.

24 {
26 return delete string;
27}

References Skwasm::live_string_count.

◆ skString_getData()

SKWASM_EXPORT char * skString_getData ( SkString *  string)

Definition at line 16 of file string.cc.

16 {
17 return string->data();
18}

◆ skString_getLength()

SKWASM_EXPORT int skString_getLength ( SkString *  string)

Definition at line 20 of file string.cc.

20 {
21 return string->size();
22}