Modest/include/myhtml/mystring.h

59 lines
2.6 KiB
C
Raw Normal View History

2016-08-29 00:20:40 +03:00
/*
Copyright (C) 2015-2017 Alexander Borisov
2016-08-29 00:20:40 +03:00
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Author: lex.borisov@gmail.com (Alexander Borisov)
*/
#ifndef MyHTML_MYSTRING_H
#define MyHTML_MYSTRING_H
#pragma once
#ifdef __cplusplus
2017-03-12 18:05:22 +03:00
extern "C" {
2016-08-29 00:20:40 +03:00
#endif
2017-03-11 22:53:26 +03:00
#include <myhtml/myosi.h>
2017-03-11 22:53:26 +03:00
#include <myencoding/encoding.h>
#include <myencoding/mystring.h>
2017-03-11 22:53:26 +03:00
#include <mycore/mystring.h>
#include <mycore/utils/mchar_async.h>
2016-08-29 00:20:40 +03:00
#define myhtml_string_get(str, attr) str->attr
#define myhtml_string_set(str, attr) myhtml_string_get(str, attr)
#define myhtml_string_len(str) myhtml_string_get(str, length)
/* append with convert encoding with preprocessing */
size_t myhtml_string_append_with_convert_encoding_with_preprocessing(mycore_string_t* str, const char* buff, size_t length, myencoding_t encoding, bool emit_null_chars);
size_t myhtml_string_append_chunk_with_convert_encoding_with_preprocessing(mycore_string_t* str, myencoding_result_t* res, const char* buff, size_t length, myencoding_t encoding, bool emit_null_chars);
2016-08-29 00:20:40 +03:00
/* append with convert encoding lowercase with preprocessing */
size_t myhtml_string_append_lowercase_with_convert_encoding_with_preprocessing(mycore_string_t* str, const char* buff, size_t length, myencoding_t encoding, bool emit_null_chars);
size_t myhtml_string_append_lowercase_chunk_with_convert_encoding_with_preprocessing(mycore_string_t* str, myencoding_result_t* res, const char* buff, size_t length, myencoding_t encoding, bool emit_null_chars);
2016-08-29 00:20:40 +03:00
/* append with preprocessing */
size_t myhtml_string_before_append_any_preprocessing(mycore_string_t* str, const char* buff, size_t length, size_t last_position);
size_t myhtml_string_append_with_preprocessing(mycore_string_t* str, const char* buff, size_t length, bool emit_null_chars);
size_t myhtml_string_append_lowercase_with_preprocessing(mycore_string_t* str, const char* buff, size_t length, bool emit_null_chars);
2016-08-29 00:20:40 +03:00
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* myhtml_mystring_h */