listed in <xref linkend="functions-string-other"/>. (Some of
these are used internally to implement
the <acronym>SQL</acronym>-standard string functions listed in
<xref linkend="functions-string-sql"/>.)
There are also pattern-matching operators, which are described in
<xref linkend="functions-matching"/>, and operators for full-text
search, which are described in <xref linkend="textsearch"/>.
</para>
<table id="functions-string-other">
<title>Other String Functions and Operators</title>
<tgroup cols="1">
<thead>
<row>
<entry role="func_table_entry"><para role="func_signature">
Function/Operator
</para>
<para>
Description
</para>
<para>
Example(s)
</para></entry>
</row>
</thead>
<tbody>
<row>
<entry role="func_table_entry"><para role="func_signature">
<indexterm>
<primary>character string</primary>
<secondary>prefix test</secondary>
</indexterm>
<type>text</type> <literal>^@</literal> <type>text</type>
<returnvalue>boolean</returnvalue>
</para>
<para>
Returns true if the first string starts with the second string
(equivalent to the <function>starts_with()</function> function).
</para>
<para>
<literal>'alphabet' ^@ 'alph'</literal>
<returnvalue>t</returnvalue>
</para></entry>
</row>
<row>
<entry role="func_table_entry"><para role="func_signature">
<indexterm>
<primary>ascii</primary>
</indexterm>
<function>ascii</function> ( <type>text</type> )
<returnvalue>integer</returnvalue>
</para>
<para>
Returns the numeric code of the first character of the argument.
In <acronym>UTF8</acronym> encoding, returns the Unicode code point
of the character. In other multibyte encodings, the argument must
be an <acronym>ASCII</acronym> character.
</para>
<para>
<literal>ascii('x')</literal>
<returnvalue>120</returnvalue>
</para></entry>
</row>
<row>
<entry role="func_table_entry"><para role="func_signature">
<indexterm>
<primary>chr</primary>
</indexterm>
<function>chr</function> ( <type>integer</type> )
<returnvalue>text</returnvalue>
</para>
<para>
Returns the character with the given code. In <acronym>UTF8</acronym>
encoding the argument is treated as a Unicode code point. In other
multibyte encodings the argument must designate
an <acronym>ASCII</acronym> character. <literal>chr(0)</literal> is
disallowed because text data types cannot store that character.
</para>
<para>
<literal>chr(65)</literal>
<returnvalue>A</returnvalue>
</para></entry>
</row>
<row>
<entry role="func_table_entry"><para role="func_signature">
<indexterm>
<primary>concat</primary>
</indexterm>
<function>concat</function> ( <parameter>val1</parameter> <type>"any"</type>
<optional>, <parameter>val2</parameter> <type>"any"</type> <optional>, ...</optional> </optional> )
<returnvalue>text</returnvalue>
</para>
<para>
Concatenates the text representations of all the arguments.
NULL arguments are ignored.
</para>
<para>
<literal>concat('abcde', 2, NULL, 22)</literal>
<returnvalue>abcde222</returnvalue>
</para></entry>
</row>
<row>
<entry role="func_table_entry"><para role="func_signature">
<indexterm>
<primary>concat_ws</primary>
</indexterm>
<function>concat_ws</function> ( <parameter>sep</parameter> <type>text</type>,
<parameter>val1</parameter> <type>"any"</type>
<optional>, <parameter>val2</parameter> <type>"any"</type>