Flutter Engine
The Flutter Engine
string.cpp
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "export.h"
6
8
10 return new SkString(length);
11}
12
14 return string->data();
15}
16
18 return delete string;
19}
20
21SKWASM_EXPORT std::u16string* skString16_allocate(size_t length) {
22 std::u16string* string = new std::u16string();
23 string->resize(length);
24 return string;
25}
26
27SKWASM_EXPORT char16_t* skString16_getData(std::u16string* string) {
28 return string->data();
29}
30
31SKWASM_EXPORT void skString16_free(std::u16string* string) {
32 delete string;
33}
size_t length
SKWASM_EXPORT SkString * skString_allocate(size_t length)
Definition: string.cpp:9
SKWASM_EXPORT std::u16string * skString16_allocate(size_t length)
Definition: string.cpp:21
SKWASM_EXPORT void skString_free(SkString *string)
Definition: string.cpp:17
SKWASM_EXPORT void skString16_free(std::u16string *string)
Definition: string.cpp:31
SKWASM_EXPORT char * skString_getData(SkString *string)
Definition: string.cpp:13
SKWASM_EXPORT char16_t * skString16_getData(std::u16string *string)
Definition: string.cpp:27
#define SKWASM_EXPORT
Definition: export.h:10