MCPcopy Create free account
hub / github.com/HaxeFoundation/hxcpp / Ascii

Class Ascii

include/cpp/encoding/Ascii.hpp:7–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5 namespace encoding
6 {
7 struct Ascii final
8 {
9 static bool isEncoded(const String& string);
10
11 /// <summary>
12 /// Encode the provided string to ASCII bytes and write them to the buffer.
13 /// If the provided string is UTF16 encoded an exception is raised and nothing is written to the buffer.
14 /// </summary>
15 /// <returns>Number of chars written to the buffer.</returns>
16 static int64_t encode(const String& string, cpp::marshal::View<uint8_t> buffer);
17
18 /// <summary>
19 /// Create a string from the provided ASCII bytes.
20 /// </summary>
21 static String decode(cpp::marshal::View<uint8_t> string);
22 };
23 }
24}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected