summaryrefslogtreecommitdiff
path: root/gtk/gtktexttypes.c
blob: 7575a612943925141f87c4b1a15f709f14f33319 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <config.h>
#include "gtktexttypes.h"

/* These are used to represent embedded non-character objects
 * if you return a string representation of a text buffer
 */
const gchar gtk_text_unknown_char_utf8[] = { '\xEF', '\xBF', '\xBC', '\0' };

static inline gboolean
inline_byte_begins_utf8_char (const gchar *byte)
{
  return ((*byte & 0xC0) != 0x80);
}

gboolean
gtk_text_byte_begins_utf8_char (const gchar *byte)
{
  return inline_byte_begins_utf8_char (byte);
}