mirror of
https://github.com/dlang/phobos.git
synced 2025-04-29 22:50:38 +03:00
Add @nogc
attribute
This commit is contained in:
parent
70d0a6dbae
commit
deb82feaa2
4 changed files with 60 additions and 50 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -8,13 +8,16 @@
|
||||||
//Automatically generated from Unicode Character Database files
|
//Automatically generated from Unicode Character Database files
|
||||||
|
|
||||||
module std.internal.unicode_tables;
|
module std.internal.unicode_tables;
|
||||||
@safe pure nothrow:
|
@safe pure nothrow @nogc:
|
||||||
|
|
||||||
|
|
||||||
struct SimpleCaseEntry
|
struct SimpleCaseEntry
|
||||||
{
|
{
|
||||||
uint ch;
|
uint ch;
|
||||||
ubyte n, bucket;// n - number in bucket
|
ubyte n, bucket;// n - number in bucket
|
||||||
|
|
||||||
|
pure nothrow @nogc:
|
||||||
|
|
||||||
@property ubyte size() const
|
@property ubyte size() const
|
||||||
{
|
{
|
||||||
return bucket & 0x3F;
|
return bucket & 0x3F;
|
||||||
|
@ -35,7 +38,7 @@ struct FullCaseEntry
|
||||||
ubyte n, size;// n number in batch, size - size of batch
|
ubyte n, size;// n number in batch, size - size of batch
|
||||||
ubyte entry_len;
|
ubyte entry_len;
|
||||||
|
|
||||||
@property auto value() const @trusted
|
@property auto value() const @trusted pure nothrow @nogc
|
||||||
{
|
{
|
||||||
return seq[0..entry_len];
|
return seq[0..entry_len];
|
||||||
}
|
}
|
||||||
|
@ -1851,7 +1854,7 @@ _U("Yi Syllables", Yi_Syllables),
|
||||||
struct scripts
|
struct scripts
|
||||||
{
|
{
|
||||||
private alias _U = immutable(UnicodeProperty);
|
private alias _U = immutable(UnicodeProperty);
|
||||||
@property static _U[] tab() pure { return _tab; }
|
@property static _U[] tab() pure nothrow @nogc { return _tab; }
|
||||||
static immutable:
|
static immutable:
|
||||||
private alias _T = ubyte[];
|
private alias _T = ubyte[];
|
||||||
_T Buhid = [0x97, 0x40, 0x14];
|
_T Buhid = [0x97, 0x40, 0x14];
|
||||||
|
@ -2065,7 +2068,7 @@ _U("Yi", Yi),
|
||||||
struct hangul
|
struct hangul
|
||||||
{
|
{
|
||||||
private alias _U = immutable(UnicodeProperty);
|
private alias _U = immutable(UnicodeProperty);
|
||||||
@property static _U[] tab() pure { return _tab; }
|
@property static _U[] tab() pure nothrow @nogc { return _tab; }
|
||||||
static immutable:
|
static immutable:
|
||||||
private alias _T = ubyte[];
|
private alias _T = ubyte[];
|
||||||
_T LVT = [0xa0, 0xac, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1, 0x1b, 0x1,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
|
||||||
this(uint low, uint high)
|
this(uint low, uint high)
|
||||||
{
|
{
|
||||||
_tuple[0] = low;
|
_tuple[0] = low;
|
||||||
|
@ -3014,7 +3017,7 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
// pedantic version for ctfe, and aligned-access only architectures
|
// pedantic version for ctfe, and aligned-access only architectures
|
||||||
@trusted uint safeRead24(const ubyte* ptr, size_t idx) pure nothrow
|
@trusted uint safeRead24(const ubyte* ptr, size_t idx) pure nothrow @nogc
|
||||||
{
|
{
|
||||||
idx *= 3;
|
idx *= 3;
|
||||||
version(LittleEndian)
|
version(LittleEndian)
|
||||||
|
@ -3026,7 +3029,7 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
// ditto
|
// ditto
|
||||||
@trusted void safeWrite24(ubyte* ptr, uint val, size_t idx) pure nothrow
|
@trusted void safeWrite24(ubyte* ptr, uint val, size_t idx) pure nothrow @nogc
|
||||||
{
|
{
|
||||||
idx *= 3;
|
idx *= 3;
|
||||||
version(LittleEndian)
|
version(LittleEndian)
|
||||||
|
@ -3044,7 +3047,7 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
// unaligned x86-like read/write functions
|
// unaligned x86-like read/write functions
|
||||||
@trusted uint unalignedRead24(const ubyte* ptr, size_t idx) pure nothrow
|
@trusted uint unalignedRead24(const ubyte* ptr, size_t idx) pure nothrow @nogc
|
||||||
{
|
{
|
||||||
uint* src = cast(uint*)(ptr+3*idx);
|
uint* src = cast(uint*)(ptr+3*idx);
|
||||||
version(LittleEndian)
|
version(LittleEndian)
|
||||||
|
@ -3054,7 +3057,7 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
// ditto
|
// ditto
|
||||||
@trusted void unalignedWrite24(ubyte* ptr, uint val, size_t idx) pure nothrow
|
@trusted void unalignedWrite24(ubyte* ptr, uint val, size_t idx) pure nothrow @nogc
|
||||||
{
|
{
|
||||||
uint* dest = cast(uint*)(cast(ubyte*)ptr + 3*idx);
|
uint* dest = cast(uint*)(cast(ubyte*)ptr + 3*idx);
|
||||||
version(LittleEndian)
|
version(LittleEndian)
|
||||||
|
@ -3063,7 +3066,7 @@ private:
|
||||||
*dest = (val<<8) | (*dest & 0xFF);
|
*dest = (val<<8) | (*dest & 0xFF);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint read24(const ubyte* ptr, size_t idx) pure nothrow
|
uint read24(const ubyte* ptr, size_t idx) pure nothrow @nogc
|
||||||
{
|
{
|
||||||
static if(hasUnalignedReads)
|
static if(hasUnalignedReads)
|
||||||
return __ctfe ? safeRead24(ptr, idx) : unalignedRead24(ptr, idx);
|
return __ctfe ? safeRead24(ptr, idx) : unalignedRead24(ptr, idx);
|
||||||
|
@ -3071,7 +3074,7 @@ uint read24(const ubyte* ptr, size_t idx) pure nothrow
|
||||||
return safeRead24(ptr, idx);
|
return safeRead24(ptr, idx);
|
||||||
}
|
}
|
||||||
|
|
||||||
void write24(ubyte* ptr, uint val, size_t idx) pure nothrow
|
void write24(ubyte* ptr, uint val, size_t idx) pure nothrow @nogc
|
||||||
{
|
{
|
||||||
static if(hasUnalignedReads)
|
static if(hasUnalignedReads)
|
||||||
return __ctfe ? safeWrite24(ptr, val, idx) : unalignedWrite24(ptr, val, idx);
|
return __ctfe ? safeWrite24(ptr, val, idx) : unalignedWrite24(ptr, val, idx);
|
||||||
|
@ -4599,7 +4602,7 @@ enum Mode {
|
||||||
alwaysSkip,
|
alwaysSkip,
|
||||||
neverSkip,
|
neverSkip,
|
||||||
skipOnMatch
|
skipOnMatch
|
||||||
};
|
}
|
||||||
|
|
||||||
mixin template ForwardStrings()
|
mixin template ForwardStrings()
|
||||||
{
|
{
|
||||||
|
@ -6655,7 +6658,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Gets a $(CODEPOINT) at the given index in this cluster.
|
/// Gets a $(CODEPOINT) at the given index in this cluster.
|
||||||
dchar opIndex(size_t index) const pure nothrow
|
dchar opIndex(size_t index) const pure nothrow @nogc
|
||||||
{
|
{
|
||||||
assert(index < length);
|
assert(index < length);
|
||||||
return read24(isBig ? ptr_ : small_.ptr, index);
|
return read24(isBig ? ptr_ : small_.ptr, index);
|
||||||
|
@ -6678,7 +6681,7 @@ public:
|
||||||
assert(!g.valid);
|
assert(!g.valid);
|
||||||
---
|
---
|
||||||
+/
|
+/
|
||||||
void opIndexAssign(dchar ch, size_t index) pure nothrow
|
void opIndexAssign(dchar ch, size_t index) pure nothrow @nogc
|
||||||
{
|
{
|
||||||
assert(index < length);
|
assert(index < length);
|
||||||
write24(isBig ? ptr_ : small_.ptr, ch, index);
|
write24(isBig ? ptr_ : small_.ptr, ch, index);
|
||||||
|
@ -6690,19 +6693,19 @@ public:
|
||||||
Warning: Invalidates when this Grapheme leaves the scope,
|
Warning: Invalidates when this Grapheme leaves the scope,
|
||||||
attempts to use it then would lead to memory corruption.
|
attempts to use it then would lead to memory corruption.
|
||||||
+/
|
+/
|
||||||
@system auto opSlice(size_t a, size_t b) pure nothrow
|
@system auto opSlice(size_t a, size_t b) pure nothrow @nogc
|
||||||
{
|
{
|
||||||
return sliceOverIndexed(a, b, &this);
|
return sliceOverIndexed(a, b, &this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// ditto
|
/// ditto
|
||||||
@system auto opSlice() pure nothrow
|
@system auto opSlice() pure nothrow @nogc
|
||||||
{
|
{
|
||||||
return sliceOverIndexed(0, length, &this);
|
return sliceOverIndexed(0, length, &this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Grapheme cluster length in $(CODEPOINTS).
|
/// Grapheme cluster length in $(CODEPOINTS).
|
||||||
@property size_t length() const pure nothrow
|
@property size_t length() const pure nothrow @nogc
|
||||||
{
|
{
|
||||||
return isBig ? len_ : slen_ & 0x7F;
|
return isBig ? len_ : slen_ & 0x7F;
|
||||||
}
|
}
|
||||||
|
@ -6845,13 +6848,13 @@ private:
|
||||||
setBig();
|
setBig();
|
||||||
}
|
}
|
||||||
|
|
||||||
void setBig(){ slen_ |= small_flag; }
|
void setBig() pure nothrow @nogc { slen_ |= small_flag; }
|
||||||
|
|
||||||
@property size_t smallLength() pure nothrow
|
@property size_t smallLength() const pure nothrow @nogc
|
||||||
{
|
{
|
||||||
return slen_ & small_mask;
|
return slen_ & small_mask;
|
||||||
}
|
}
|
||||||
@property ubyte isBig() const pure nothrow
|
@property ubyte isBig() const pure nothrow @nogc
|
||||||
{
|
{
|
||||||
return slen_ & small_flag;
|
return slen_ & small_flag;
|
||||||
}
|
}
|
||||||
|
@ -7322,7 +7325,7 @@ enum {
|
||||||
assert(compose('\u0308', 'A') == dchar.init);
|
assert(compose('\u0308', 'A') == dchar.init);
|
||||||
---
|
---
|
||||||
+/
|
+/
|
||||||
public dchar compose(dchar first, dchar second)
|
public dchar compose(dchar first, dchar second) pure nothrow
|
||||||
{
|
{
|
||||||
import std.internal.unicode_comp;
|
import std.internal.unicode_comp;
|
||||||
size_t packed = compositionJumpTrie[first];
|
size_t packed = compositionJumpTrie[first];
|
||||||
|
@ -7412,14 +7415,14 @@ enum jamoNCount = jamoVCount * jamoTCount;
|
||||||
enum jamoSCount = jamoLCount * jamoNCount;
|
enum jamoSCount = jamoLCount * jamoNCount;
|
||||||
|
|
||||||
// Tests if $(D ch) is a Hangul leading consonant jamo.
|
// Tests if $(D ch) is a Hangul leading consonant jamo.
|
||||||
bool isJamoL(dchar ch)
|
bool isJamoL(dchar ch) pure nothrow @nogc
|
||||||
{
|
{
|
||||||
// first cmp rejects ~ 1M code points above leading jamo range
|
// first cmp rejects ~ 1M code points above leading jamo range
|
||||||
return ch < jamoLBase+jamoLCount && ch >= jamoLBase;
|
return ch < jamoLBase+jamoLCount && ch >= jamoLBase;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tests if $(D ch) is a Hangul vowel jamo.
|
// Tests if $(D ch) is a Hangul vowel jamo.
|
||||||
bool isJamoT(dchar ch)
|
bool isJamoT(dchar ch) pure nothrow @nogc
|
||||||
{
|
{
|
||||||
// first cmp rejects ~ 1M code points above trailing jamo range
|
// first cmp rejects ~ 1M code points above trailing jamo range
|
||||||
// Note: ch == jamoTBase doesn't indicate trailing jamo (TIndex must be > 0)
|
// Note: ch == jamoTBase doesn't indicate trailing jamo (TIndex must be > 0)
|
||||||
|
@ -7427,20 +7430,20 @@ bool isJamoT(dchar ch)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tests if $(D ch) is a Hangul trailnig consonant jamo.
|
// Tests if $(D ch) is a Hangul trailnig consonant jamo.
|
||||||
bool isJamoV(dchar ch)
|
bool isJamoV(dchar ch) pure nothrow @nogc
|
||||||
{
|
{
|
||||||
// first cmp rejects ~ 1M code points above vowel range
|
// first cmp rejects ~ 1M code points above vowel range
|
||||||
return ch < jamoVBase+jamoVCount && ch >= jamoVBase;
|
return ch < jamoVBase+jamoVCount && ch >= jamoVBase;
|
||||||
}
|
}
|
||||||
|
|
||||||
int hangulSyllableIndex(dchar ch)
|
int hangulSyllableIndex(dchar ch) pure nothrow @nogc
|
||||||
{
|
{
|
||||||
int idxS = cast(int)ch - jamoSBase;
|
int idxS = cast(int)ch - jamoSBase;
|
||||||
return idxS >= 0 && idxS < jamoSCount ? idxS : -1;
|
return idxS >= 0 && idxS < jamoSCount ? idxS : -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// internal helper: compose hangul syllables leaving dchar.init in holes
|
// internal helper: compose hangul syllables leaving dchar.init in holes
|
||||||
void hangulRecompose(dchar[] seq)
|
void hangulRecompose(dchar[] seq) pure nothrow @nogc
|
||||||
{
|
{
|
||||||
for(size_t idx = 0; idx + 1 < seq.length; )
|
for(size_t idx = 0; idx + 1 < seq.length; )
|
||||||
{
|
{
|
||||||
|
@ -7517,7 +7520,7 @@ Grapheme decomposeHangul(dchar ch)
|
||||||
assert(composeJamo('A', '\u1171') == dchar.init);
|
assert(composeJamo('A', '\u1171') == dchar.init);
|
||||||
---
|
---
|
||||||
+/
|
+/
|
||||||
dchar composeJamo(dchar lead, dchar vowel, dchar trailing=dchar.init)
|
dchar composeJamo(dchar lead, dchar vowel, dchar trailing=dchar.init) pure nothrow @nogc
|
||||||
{
|
{
|
||||||
if(!isJamoL(lead))
|
if(!isJamoL(lead))
|
||||||
return dchar.init;
|
return dchar.init;
|
||||||
|
@ -7707,7 +7710,7 @@ unittest
|
||||||
}
|
}
|
||||||
|
|
||||||
// canonically recompose given slice of code points, works in-place and mutates data
|
// canonically recompose given slice of code points, works in-place and mutates data
|
||||||
private size_t recompose(size_t start, dchar[] input, ubyte[] ccc)
|
private size_t recompose(size_t start, dchar[] input, ubyte[] ccc) pure nothrow
|
||||||
{
|
{
|
||||||
assert(input.length == ccc.length);
|
assert(input.length == ccc.length);
|
||||||
int accumCC = -1;// so that it's out of 0..255 range
|
int accumCC = -1;// so that it's out of 0..255 range
|
||||||
|
@ -7883,7 +7886,7 @@ else
|
||||||
{
|
{
|
||||||
|
|
||||||
// trusted -> avoid bounds check
|
// trusted -> avoid bounds check
|
||||||
@trusted pure nothrow
|
@trusted pure nothrow @nogc
|
||||||
{
|
{
|
||||||
// hide template instances behind functions (Bugzilla 13232)
|
// hide template instances behind functions (Bugzilla 13232)
|
||||||
ushort toLowerIndex(dchar c) { return toLowerIndexTrie[c]; }
|
ushort toLowerIndex(dchar c) { return toLowerIndexTrie[c]; }
|
||||||
|
@ -7915,7 +7918,7 @@ public bool isWhite(dchar c)
|
||||||
/++
|
/++
|
||||||
Return whether $(D c) is a Unicode lowercase $(CHARACTER).
|
Return whether $(D c) is a Unicode lowercase $(CHARACTER).
|
||||||
+/
|
+/
|
||||||
@safe pure nothrow
|
@safe pure nothrow @nogc
|
||||||
bool isLower(dchar c)
|
bool isLower(dchar c)
|
||||||
{
|
{
|
||||||
if(std.ascii.isASCII(c))
|
if(std.ascii.isASCII(c))
|
||||||
|
@ -7946,7 +7949,7 @@ bool isLower(dchar c)
|
||||||
/++
|
/++
|
||||||
Return whether $(D c) is a Unicode uppercase $(CHARACTER).
|
Return whether $(D c) is a Unicode uppercase $(CHARACTER).
|
||||||
+/
|
+/
|
||||||
@safe pure nothrow
|
@safe pure nothrow @nogc
|
||||||
bool isUpper(dchar c)
|
bool isUpper(dchar c)
|
||||||
{
|
{
|
||||||
if(std.ascii.isASCII(c))
|
if(std.ascii.isASCII(c))
|
||||||
|
@ -7980,7 +7983,7 @@ bool isUpper(dchar c)
|
||||||
Warning: certain alphabets like German and Greek have no 1:1
|
Warning: certain alphabets like German and Greek have no 1:1
|
||||||
upper-lower mapping. Use overload of toLower which takes full string instead.
|
upper-lower mapping. Use overload of toLower which takes full string instead.
|
||||||
+/
|
+/
|
||||||
@safe pure nothrow
|
@safe pure nothrow @nogc
|
||||||
dchar toLower(dchar c)
|
dchar toLower(dchar c)
|
||||||
{
|
{
|
||||||
// optimize ASCII case
|
// optimize ASCII case
|
||||||
|
@ -8002,7 +8005,7 @@ dchar toLower(dchar c)
|
||||||
|
|
||||||
//TODO: Hidden for now, needs better API.
|
//TODO: Hidden for now, needs better API.
|
||||||
//Other transforms could use better API as well, but this one is a new primitive.
|
//Other transforms could use better API as well, but this one is a new primitive.
|
||||||
@safe pure nothrow
|
@safe pure nothrow @nogc
|
||||||
private dchar toTitlecase(dchar c)
|
private dchar toTitlecase(dchar c)
|
||||||
{
|
{
|
||||||
// optimize ASCII case
|
// optimize ASCII case
|
||||||
|
@ -8072,7 +8075,7 @@ unittest //12428
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: helper, I wish std.utf was more flexible (and stright)
|
// TODO: helper, I wish std.utf was more flexible (and stright)
|
||||||
private size_t encodeTo(char[] buf, size_t idx, dchar c) @trusted pure
|
private size_t encodeTo(char[] buf, size_t idx, dchar c) @trusted pure nothrow @nogc
|
||||||
{
|
{
|
||||||
if (c <= 0x7F)
|
if (c <= 0x7F)
|
||||||
{
|
{
|
||||||
|
@ -8138,7 +8141,7 @@ private size_t encodeTo(wchar[] buf, size_t idx, dchar c) @trusted pure
|
||||||
return idx;
|
return idx;
|
||||||
}
|
}
|
||||||
|
|
||||||
private size_t encodeTo(dchar[] buf, size_t idx, dchar c) @trusted pure
|
private size_t encodeTo(dchar[] buf, size_t idx, dchar c) @trusted pure nothrow @nogc
|
||||||
{
|
{
|
||||||
buf[idx] = c;
|
buf[idx] = c;
|
||||||
idx++;
|
idx++;
|
||||||
|
@ -8469,7 +8472,7 @@ unittest
|
||||||
Certain alphabets like German and Greek have no 1:1
|
Certain alphabets like German and Greek have no 1:1
|
||||||
upper-lower mapping. Use overload of toUpper which takes full string instead.
|
upper-lower mapping. Use overload of toUpper which takes full string instead.
|
||||||
+/
|
+/
|
||||||
@safe pure nothrow
|
@safe pure nothrow @nogc
|
||||||
dchar toUpper(dchar c)
|
dchar toUpper(dchar c)
|
||||||
{
|
{
|
||||||
// optimize ASCII case
|
// optimize ASCII case
|
||||||
|
@ -8615,7 +8618,7 @@ unittest
|
||||||
Returns whether $(D c) is a Unicode alphabetic $(CHARACTER)
|
Returns whether $(D c) is a Unicode alphabetic $(CHARACTER)
|
||||||
(general Unicode category: Alphabetic).
|
(general Unicode category: Alphabetic).
|
||||||
+/
|
+/
|
||||||
@safe pure nothrow
|
@safe pure nothrow @nogc
|
||||||
bool isAlpha(dchar c)
|
bool isAlpha(dchar c)
|
||||||
{
|
{
|
||||||
// optimization
|
// optimization
|
||||||
|
@ -8650,7 +8653,7 @@ bool isAlpha(dchar c)
|
||||||
Returns whether $(D c) is a Unicode mark
|
Returns whether $(D c) is a Unicode mark
|
||||||
(general Unicode category: Mn, Me, Mc).
|
(general Unicode category: Mn, Me, Mc).
|
||||||
+/
|
+/
|
||||||
@safe pure nothrow
|
@safe pure nothrow @nogc
|
||||||
bool isMark(dchar c)
|
bool isMark(dchar c)
|
||||||
{
|
{
|
||||||
return markTrie[c];
|
return markTrie[c];
|
||||||
|
@ -8669,7 +8672,7 @@ bool isMark(dchar c)
|
||||||
Returns whether $(D c) is a Unicode numerical $(CHARACTER)
|
Returns whether $(D c) is a Unicode numerical $(CHARACTER)
|
||||||
(general Unicode category: Nd, Nl, No).
|
(general Unicode category: Nd, Nl, No).
|
||||||
+/
|
+/
|
||||||
@safe pure nothrow
|
@safe pure nothrow @nogc
|
||||||
bool isNumber(dchar c)
|
bool isNumber(dchar c)
|
||||||
{
|
{
|
||||||
return numberTrie[c];
|
return numberTrie[c];
|
||||||
|
@ -8689,7 +8692,7 @@ bool isNumber(dchar c)
|
||||||
Returns whether $(D c) is a Unicode punctuation $(CHARACTER)
|
Returns whether $(D c) is a Unicode punctuation $(CHARACTER)
|
||||||
(general Unicode category: Pd, Ps, Pe, Pc, Po, Pi, Pf).
|
(general Unicode category: Pd, Ps, Pe, Pc, Po, Pi, Pf).
|
||||||
+/
|
+/
|
||||||
@safe pure nothrow
|
@safe pure nothrow @nogc
|
||||||
bool isPunctuation(dchar c)
|
bool isPunctuation(dchar c)
|
||||||
{
|
{
|
||||||
return punctuationTrie[c];
|
return punctuationTrie[c];
|
||||||
|
@ -8712,7 +8715,7 @@ unittest
|
||||||
Returns whether $(D c) is a Unicode symbol $(CHARACTER)
|
Returns whether $(D c) is a Unicode symbol $(CHARACTER)
|
||||||
(general Unicode category: Sm, Sc, Sk, So).
|
(general Unicode category: Sm, Sc, Sk, So).
|
||||||
+/
|
+/
|
||||||
@safe pure nothrow
|
@safe pure nothrow @nogc
|
||||||
bool isSymbol(dchar c)
|
bool isSymbol(dchar c)
|
||||||
{
|
{
|
||||||
return symbolTrie[c];
|
return symbolTrie[c];
|
||||||
|
@ -8735,7 +8738,7 @@ unittest
|
||||||
Note: This doesn't include '\n', '\r', \t' and other non-space $(CHARACTER).
|
Note: This doesn't include '\n', '\r', \t' and other non-space $(CHARACTER).
|
||||||
For commonly used less strict semantics see $(LREF isWhite).
|
For commonly used less strict semantics see $(LREF isWhite).
|
||||||
+/
|
+/
|
||||||
@safe pure nothrow
|
@safe pure nothrow @nogc
|
||||||
bool isSpace(dchar c)
|
bool isSpace(dchar c)
|
||||||
{
|
{
|
||||||
return isSpaceGen(c);
|
return isSpaceGen(c);
|
||||||
|
@ -8757,7 +8760,7 @@ unittest
|
||||||
(general Unicode category: L, M, N, P, S, Zs).
|
(general Unicode category: L, M, N, P, S, Zs).
|
||||||
|
|
||||||
+/
|
+/
|
||||||
@safe pure nothrow
|
@safe pure nothrow @nogc
|
||||||
bool isGraphical(dchar c)
|
bool isGraphical(dchar c)
|
||||||
{
|
{
|
||||||
return graphicalTrie[c];
|
return graphicalTrie[c];
|
||||||
|
@ -8779,7 +8782,7 @@ unittest
|
||||||
Returns whether $(D c) is a Unicode control $(CHARACTER)
|
Returns whether $(D c) is a Unicode control $(CHARACTER)
|
||||||
(general Unicode category: Cc).
|
(general Unicode category: Cc).
|
||||||
+/
|
+/
|
||||||
@safe pure nothrow
|
@safe pure nothrow @nogc
|
||||||
bool isControl(dchar c)
|
bool isControl(dchar c)
|
||||||
{
|
{
|
||||||
return isControlGen(c);
|
return isControlGen(c);
|
||||||
|
@ -8802,7 +8805,7 @@ unittest
|
||||||
Returns whether $(D c) is a Unicode formatting $(CHARACTER)
|
Returns whether $(D c) is a Unicode formatting $(CHARACTER)
|
||||||
(general Unicode category: Cf).
|
(general Unicode category: Cf).
|
||||||
+/
|
+/
|
||||||
@safe pure nothrow
|
@safe pure nothrow @nogc
|
||||||
bool isFormat(dchar c)
|
bool isFormat(dchar c)
|
||||||
{
|
{
|
||||||
return isFormatGen(c);
|
return isFormatGen(c);
|
||||||
|
@ -8823,7 +8826,7 @@ unittest
|
||||||
Returns whether $(D c) is a Unicode Private Use $(CODEPOINT)
|
Returns whether $(D c) is a Unicode Private Use $(CODEPOINT)
|
||||||
(general Unicode category: Co).
|
(general Unicode category: Co).
|
||||||
+/
|
+/
|
||||||
@safe pure nothrow
|
@safe pure nothrow @nogc
|
||||||
bool isPrivateUse(dchar c)
|
bool isPrivateUse(dchar c)
|
||||||
{
|
{
|
||||||
return (0x00_E000 <= c && c <= 0x00_F8FF)
|
return (0x00_E000 <= c && c <= 0x00_F8FF)
|
||||||
|
@ -8835,7 +8838,7 @@ bool isPrivateUse(dchar c)
|
||||||
Returns whether $(D c) is a Unicode surrogate $(CODEPOINT)
|
Returns whether $(D c) is a Unicode surrogate $(CODEPOINT)
|
||||||
(general Unicode category: Cs).
|
(general Unicode category: Cs).
|
||||||
+/
|
+/
|
||||||
@safe pure nothrow
|
@safe pure nothrow @nogc
|
||||||
bool isSurrogate(dchar c)
|
bool isSurrogate(dchar c)
|
||||||
{
|
{
|
||||||
return (0xD800 <= c && c <= 0xDFFF);
|
return (0xD800 <= c && c <= 0xDFFF);
|
||||||
|
@ -8844,7 +8847,7 @@ bool isSurrogate(dchar c)
|
||||||
/++
|
/++
|
||||||
Returns whether $(D c) is a Unicode high surrogate (lead surrogate).
|
Returns whether $(D c) is a Unicode high surrogate (lead surrogate).
|
||||||
+/
|
+/
|
||||||
@safe pure nothrow
|
@safe pure nothrow @nogc
|
||||||
bool isSurrogateHi(dchar c)
|
bool isSurrogateHi(dchar c)
|
||||||
{
|
{
|
||||||
return (0xD800 <= c && c <= 0xDBFF);
|
return (0xD800 <= c && c <= 0xDBFF);
|
||||||
|
@ -8853,7 +8856,7 @@ bool isSurrogateHi(dchar c)
|
||||||
/++
|
/++
|
||||||
Returns whether $(D c) is a Unicode low surrogate (trail surrogate).
|
Returns whether $(D c) is a Unicode low surrogate (trail surrogate).
|
||||||
+/
|
+/
|
||||||
@safe pure nothrow
|
@safe pure nothrow @nogc
|
||||||
bool isSurrogateLo(dchar c)
|
bool isSurrogateLo(dchar c)
|
||||||
{
|
{
|
||||||
return (0xDC00 <= c && c <= 0xDFFF);
|
return (0xDC00 <= c && c <= 0xDFFF);
|
||||||
|
@ -8864,7 +8867,7 @@ bool isSurrogateLo(dchar c)
|
||||||
a $(CODEPOINT) with no assigned abstract character.
|
a $(CODEPOINT) with no assigned abstract character.
|
||||||
(general Unicode category: Cn)
|
(general Unicode category: Cn)
|
||||||
+/
|
+/
|
||||||
@safe pure nothrow
|
@safe pure nothrow @nogc
|
||||||
bool isNonCharacter(dchar c)
|
bool isNonCharacter(dchar c)
|
||||||
{
|
{
|
||||||
return nonCharacterTrie[c];
|
return nonCharacterTrie[c];
|
||||||
|
@ -8891,7 +8894,7 @@ private:
|
||||||
return const(CodepointTrie!T)(e.offsets, e.sizes, e.data);
|
return const(CodepointTrie!T)(e.offsets, e.sizes, e.data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@safe pure nothrow @property
|
@safe pure nothrow @nogc @property
|
||||||
{
|
{
|
||||||
// It's important to use auto return here, so that the compiler
|
// It's important to use auto return here, so that the compiler
|
||||||
// only runs semantic on the return type if the function gets
|
// only runs semantic on the return type if the function gets
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue