Returns the numeric value of the first character of str.
| 1405 | |
| 1406 | // Returns the numeric value of the first character of str. |
| 1407 | GANDIVA_EXPORT |
| 1408 | gdv_int32 ascii_utf8(const char* data, gdv_int32 data_len) { |
| 1409 | if (data_len == 0) { |
| 1410 | return 0; |
| 1411 | } |
| 1412 | return static_cast<gdv_int32>(static_cast<signed char>(data[0])); |
| 1413 | } |
| 1414 | |
| 1415 | // Returns the ASCII character having the binary equivalent to A. |
| 1416 | // If A is larger than 256 the result is equivalent to chr(A % 256). |