File: unicode_wcwidth.3

package info (click to toggle)
courier-unicode 2.4.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,572 kB
  • sloc: ansic: 83,912; sh: 4,230; cpp: 2,596; perl: 1,023; makefile: 663
file content (71 lines) | stat: -rw-r--r-- 2,487 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
'\" t
.\"     Title: unicode_wcwidth
.\"    Author: Sam Varshavchik
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
.\"      Date: 08/26/2025
.\"    Manual: Courier Unicode Library
.\"    Source: Courier Unicode Library
.\"  Language: English
.\"
.TH "UNICODE_WCWIDTH" "3" "08/26/2025" "Courier Unicode Library" "Courier Unicode Library"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
unicode_wcwidth, unicode_wcwidth_str \- width of a Unicode character string
.SH "SYNOPSIS"
.sp
.ft B
.nf
#include <courier\-unicode\&.h>
.fi
.ft
.HP \w'int\ unicode_wcwidth('u
.BI "int unicode_wcwidth(char32_t\ " "c" ");"
.HP \w'size_t\ unicode_wcwidth_str('u
.BI "size_t unicode_wcwidth_str(const\ char32_t\ *" "str" ");"
.SH "DESCRIPTION"
.PP
\fBunicode_wcwidth\fR
returns 1 for regular Unicode characters, 0 for control characters, and 2 for characters that normally take up the width of two regular characters on a text console\&.
.PP
\fBunicode_wcwidth_str\fR
adds up
\fBunicode_wcwidth\fR
of all characters in the null\-terminated string and returns the total
.SH "BUGS"
.PP
The width of a Unicode character is looked up in the Unicode database, and not your terminal\*(Aqs character set font\&. Hopefully your terminal\*(Aqs character set font is Unicide\-compatible\&.
.SH "SEE ALSO"
.PP
\fBcourier-unicode\fR(7),
\fBunicode_uc\fR(3),
\fBunicode_convert\fR(3),
\fBunicode_default_chset\fR(3),
\fBunicode_html40ent_lookup\fR(3),
\fBunicode_category_lookup\fR(3),
\fBunicode_grapheme_break\fR(3),
\fBunicode_word_break\fR(3),
\fBunicode_line_break\fR(3)\&.
.SH "AUTHOR"
.PP
\fBSam Varshavchik\fR
.RS 4
Author
.RE