Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit33ae03f

Browse files
committed
Document that translate() removes characters in "from" that don't have
a corresponding "to" character.Author: Josh Kupershmidt
1 parent07f1264 commit33ae03f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

‎doc/src/sgml/func.sgml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1866,10 +1866,12 @@
18661866
Any character in <parameter>string</parameter> that matches a
18671867
character in the <parameter>from</parameter> set is replaced by
18681868
the corresponding character in the <parameter>to</parameter>
1869-
set
1869+
set. If <parameter>from</parameter> is longer than
1870+
<parameter>to</parameter>, occurrences of the extra characters in
1871+
<parameter>from</parameter> are removed.
18701872
</entry>
1871-
<entry><literal>translate('12345', '14', 'ax')</literal></entry>
1872-
<entry><literal>a23x5</literal></entry>
1873+
<entry><literal>translate('12345', '143', 'ax')</literal></entry>
1874+
<entry><literal>a2x5</literal></entry>
18731875
</row>
18741876

18751877
</tbody>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp