Commit 27411d16 authored by Egmont Koblinger's avatar Egmont Koblinger

vteunistr: Add method to concatenate two unistrs

parent 5a01bf95
...@@ -140,6 +140,19 @@ _vte_unistr_append_unichar (vteunistr s, gunichar c) ...@@ -140,6 +140,19 @@ _vte_unistr_append_unichar (vteunistr s, gunichar c)
return ret; return ret;
} }
vteunistr
_vte_unistr_append_unistr (vteunistr s, vteunistr t)
{
g_return_val_if_fail (s < unistr_next, s);
g_return_val_if_fail (t < unistr_next, s);
if (G_UNLIKELY (t >= VTE_UNISTR_START)) {
s = _vte_unistr_append_unistr (s, DECOMP_FROM_UNISTR (t).prefix);
return _vte_unistr_append_unichar (s, DECOMP_FROM_UNISTR (t).suffix);
} else {
return _vte_unistr_append_unichar (s, t);
}
}
gunichar gunichar
_vte_unistr_get_base (vteunistr s) _vte_unistr_get_base (vteunistr s)
{ {
......
...@@ -57,6 +57,19 @@ typedef guint32 vteunistr; ...@@ -57,6 +57,19 @@ typedef guint32 vteunistr;
vteunistr vteunistr
_vte_unistr_append_unichar (vteunistr s, gunichar c); _vte_unistr_append_unichar (vteunistr s, gunichar c);
/**
* _vte_unistr_append_unistr:
* @s: a #vteunistr
* @t: another #vteunistr to append to @s
*
* Creates a vteunistr value for the string @s followed by the
* string @t.
*
* Returns: the new #vteunistr value
**/
vteunistr
_vte_unistr_append_unistr (vteunistr s, vteunistr t);
gunichar gunichar
_vte_unistr_get_base (vteunistr s); _vte_unistr_get_base (vteunistr s);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment