isSymmetric

bool
isSymmetric
(
R
)
()
if (
isBidirectionalRange!(R)
)

Return Value

Type: bool

If range is symmetric. * * See_Also: http://forum.dlang.org/thread/dlfeiszyweafpjiocplf@forum.dlang.org#post-vpzuaqxvtdpzpeuorxdl:40forum.dlang.org * See_Also: https://stackoverflow.com/questions/21849580/equality-operator-in-favour-of-std-range-equal * * TODO: Test graphemes in string and wstring. * TODO Move to Phobos

Examples

assert(`dallassallad`.isSymmetric);
assert(!`ab`.isSymmetric);
assert(`a`.isSymmetric);
assert(`åäå`.isSymmetric);
assert(`áá`.isSymmetric);
assert(`åäå`.isSymmetric);
assert(``.isSymmetric);
assert([1, 2, 2, 1].isSymmetric);

Meta