Skip to content

Commit 7242922

Browse files
committed
Cleanup pod for pv_uni_display
Correct an incorrect statement and use an =item list to make the flag behaviors stand out
1 parent e9c763e commit 7242922

File tree

1 file changed

+27
-6
lines changed

1 file changed

+27
-6
lines changed

utf8.c

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4163,15 +4163,36 @@ Build to the scalar C<dsv> a displayable version of the UTF-8 encoded string
41634163
C<spv>, length C<len>, the displayable version being at most C<pvlim> bytes
41644164
long (if longer, the rest is truncated and C<"..."> will be appended).
41654165
4166-
The C<flags> argument can have C<UNI_DISPLAY_ISPRINT> set to display
4167-
C<isPRINT()>able characters as themselves, C<UNI_DISPLAY_BACKSLASH>
4166+
The C<flags> argument can have any combination of these flag bits
4167+
4168+
=over
4169+
4170+
=item C<UNI_DISPLAY_ISPRINT>
4171+
4172+
to display C<isPRINT()>able characters as themselves
4173+
4174+
=item C<UNI_DISPLAY_BACKSLASH>
4175+
41684176
to display the C<\\[nrfta\\]> as the backslashed versions (like C<"\n">)
4177+
41694178
(C<UNI_DISPLAY_BACKSLASH> is preferred over C<UNI_DISPLAY_ISPRINT> for C<"\\">).
4170-
C<UNI_DISPLAY_QQ> (and its alias C<UNI_DISPLAY_REGEX>) have both
4171-
C<UNI_DISPLAY_BACKSLASH> and C<UNI_DISPLAY_ISPRINT> turned on.
41724179
4173-
Additionally, there is now C<UNI_DISPLAY_BACKSPACE> which allows C<\b> for a
4174-
backspace, but only when C<UNI_DISPLAY_BACKSLASH> also is set.
4180+
=item C<UNI_DISPLAY_BACKSPACE>
4181+
4182+
to display C<\b> for a backspace, but only when C<UNI_DISPLAY_BACKSLASH> also
4183+
is set.
4184+
4185+
=item C<UNI_DISPLAY_REGEX>
4186+
4187+
This a shorthand for C<UNI_DISPLAY_ISPRINT> along with
4188+
C<UNI_DISPLAY_BACKSLASH>.
4189+
4190+
=item C<UNI_DISPLAY_QQ>
4191+
4192+
This a shorthand for all three C<UNI_DISPLAY_ISPRINT>,
4193+
C<UNI_DISPLAY_BACKSLASH>, and C<UNI_DISPLAY_BACKSLASH>.
4194+
4195+
=back
41754196
41764197
The pointer to the PV of the C<dsv> is returned.
41774198

0 commit comments

Comments
 (0)