open62541 1.3.12
Open source implementation of OPC UA
Loading...
Searching...
No Matches
string_escape.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2009-2016 Petri Lehtinen <petri@digip.org>
3 *
4 * Jansson is free software; you can redistribute it and/or modify
5 * it under the terms of the MIT license.
6 */
7
8#ifndef STRING_ESCAPE_H
9#define STRING_ESCAPE_H
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
15#include <open62541/config.h>
16#include <string.h>
17
18/** Locale independent versions of isxxx() functions */
19#define l_isupper(c) ('A' <= (c) && (c) <= 'Z')
20#define l_islower(c) ('a' <= (c) && (c) <= 'z')
21#define l_isalpha(c) (l_isupper(c) || l_islower(c))
22#define l_isdigit(c) ('0' <= (c) && (c) <= '9')
23#define l_isxdigit(c) (l_isdigit(c) || ('A' <= (c) && (c) <= 'F') || ('a' <= (c) && (c) <= 'f'))
24
25int utf8_encode(int32_t codepoint, char *buffer, size_t *size);
26size_t utf8_check_first(char byte);
27size_t utf8_check_full(const char *buffer, size_t size, int32_t *codepoint);
28const char *utf8_iterate(const char *buffer, size_t size, int32_t *codepoint);
29int utf8_check_string(const char *string, size_t length);
30int32_t decode_unicode_escape(const char *str);
31
32#ifdef __cplusplus
33}
34#endif
35
36#endif /* STRING_ESCAPE_H */
37
size_t utf8_check_first(char byte)
int utf8_check_string(const char *string, size_t length)
const char * utf8_iterate(const char *buffer, size_t size, int32_t *codepoint)
int32_t decode_unicode_escape(const char *str)
size_t utf8_check_full(const char *buffer, size_t size, int32_t *codepoint)
int utf8_encode(int32_t codepoint, char *buffer, size_t *size)