Type representing a multibyte character table. More...
#include <stdbool.h>
Go to the source code of this file.
Data Structures | |
struct | MbTable |
Multibyte character table. More... | |
Functions | |
bool | mbtable_equal (const struct MbTable *a, const struct MbTable *b) |
Compare two MbTables. | |
void | mbtable_free (struct MbTable **ptr) |
Free an MbTable object. | |
const char * | mbtable_get_nth_wchar (const struct MbTable *table, int index) |
Extract one char from a multi-byte table. | |
struct MbTable * | mbtable_parse (const char *str) |
Parse a multibyte string into a table. | |
Type representing a multibyte character table.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file mbtable.h.
Compare two MbTables.
true | They are identical |
Definition at line 51 of file mbtable.c.
void mbtable_free | ( | struct MbTable ** | ptr | ) |
Free an MbTable object.
[out] | ptr | MbTable to free |
Definition at line 308 of file mbtable.c.
const char * mbtable_get_nth_wchar | ( | const struct MbTable * | table, |
int | index | ||
) |
Extract one char from a multi-byte table.
table | Multi-byte table |
index | Select this character |
ptr | String pointer to the character |
Extract one multi-byte character from a string table. If the index is invalid, then a space character will be returned. If the character selected is '
' (Ctrl-M), then "" will be returned.
Definition at line 331 of file mbtable.c.
struct MbTable * mbtable_parse | ( | const char * | s | ) |
Parse a multibyte string into a table.
s | String of multibyte characters |
ptr | New MbTable object |
Definition at line 66 of file mbtable.c.