Blender  V2.93
BLI_string_cursor_utf8.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2011 Blender Foundation.
17  * All rights reserved.
18  */
19 
20 #pragma once
21 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
30 typedef enum eStrCursorJumpType {
35 
40 
41 bool BLI_str_cursor_step_next_utf8(const char *str, size_t maxlen, int *pos);
42 bool BLI_str_cursor_step_prev_utf8(const char *str, size_t maxlen, int *pos);
43 
44 void BLI_str_cursor_step_utf8(const char *str,
45  size_t maxlen,
46  int *pos,
47  eStrCursorJumpDirection direction,
49  bool use_init_step);
50 
51 void BLI_str_cursor_step_utf32(const char32_t *str,
52  size_t maxlen,
53  int *pos,
54  eStrCursorJumpDirection direction,
56  bool use_init_step);
57 
58 #ifdef __cplusplus
59 }
60 #endif
void BLI_str_cursor_step_utf8(const char *str, size_t maxlen, int *pos, eStrCursorJumpDirection direction, eStrCursorJumpType jump, bool use_init_step)
bool BLI_str_cursor_step_next_utf8(const char *str, size_t maxlen, int *pos)
bool BLI_str_cursor_step_prev_utf8(const char *str, size_t maxlen, int *pos)
void BLI_str_cursor_step_utf32(const char32_t *str, size_t maxlen, int *pos, eStrCursorJumpDirection direction, eStrCursorJumpType jump, bool use_init_step)
eStrCursorJumpDirection
@ STRCUR_DIR_NEXT
@ STRCUR_DIR_PREV
eStrCursorJumpType
@ STRCUR_JUMP_ALL
@ STRCUR_JUMP_NONE
@ STRCUR_JUMP_DELIM
void jump(const btVector3 &v=btVector3(0, 0, 0))
#define str(s)
uint pos