| 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 | } |
nothing calls this directly
no outgoing calls
no test coverage detected