mirror of
https://github.com/dlang/phobos.git
synced 2025-05-07 11:37:24 +03:00
Add decodeBack changelog
This commit is contained in:
parent
9dd0f579be
commit
b7afbbc202
1 changed files with 11 additions and 0 deletions
11
changelog/std-utf-decodeBack.dd
Normal file
11
changelog/std-utf-decodeBack.dd
Normal file
|
@ -0,0 +1,11 @@
|
|||
Added `std.utf.decodeBack` which decodes the last UTF code point of given character range.
|
||||
-------
|
||||
import std.utf : decodeBack;
|
||||
|
||||
string text = "サイト";
|
||||
|
||||
assert(decodeBack(text) == 'ト');
|
||||
assert(decodeBack(text) == 'イ');
|
||||
assert(decodeBack(text) == 'サ');
|
||||
assert(text.empty);
|
||||
-------
|
Loading…
Add table
Add a link
Reference in a new issue