Sha256: 78464dc83de48ba2e273a6bb5127494507dae055610b0e1128cf8457e48dc0ca

Contents?: true

Size: 608 Bytes

Versions: 2

Compression:

Stored size: 608 Bytes

Contents

#ifndef HELPERS_ENCODING_HELPERS_H_
#define HELPERS_ENCODING_HELPERS_H_

#include <string>
#include "tree_sitter/runtime.h"

size_t string_char_count(TSInputEncoding, const std::string &);
size_t utf8_char_count(const std::string &);
size_t utf16_char_count(const std::string &);

long string_byte_for_character(TSInputEncoding, const std::string &, size_t byte_offset, size_t character);
long utf8_byte_for_character(const std::string &, size_t byte_offset, size_t character);
long utf16_byte_for_character(const std::string &, size_t byte_offset, size_t character);

#endif  // HELPERS_ENCODING_HELPERS_H_

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
tree-sitter-0.1.0 ext/tree-sitter/tree-sitter/test/helpers/encoding_helpers.h
tree-sitter-0.0.1 ext/tree-sitter/tree-sitter/spec/helpers/encoding_helpers.h