Lines Matching refs:chomp

3708 Range chomp(Range)(Range str)
3764 Range chomp(Range, C2)(Range str, const(C2)[] delimiter)
3771 return chomp(str);
3809 assert(chomp(" hello world \n\r") == " hello world \n");
3810 assert(chomp(" hello world \r\n") == " hello world ");
3811 assert(chomp(" hello world \f") == " hello world ");
3812 assert(chomp(" hello world \v") == " hello world ");
3813 assert(chomp(" hello world \n\n") == " hello world \n");
3814 assert(chomp(" hello world \n\n ") == " hello world \n\n ");
3815 assert(chomp(" hello world \n\n" ~ [lineSep]) == " hello world \n\n");
3816 assert(chomp(" hello world \n\n" ~ [paraSep]) == " hello world \n\n");
3817 assert(chomp(" hello world \n\n" ~ [ nelSep]) == " hello world \n\n");
3818 assert(chomp(" hello world") == " hello world");
3819 assert(chomp("") == "");
3821 assert(chomp(" hello world", "orld") == " hello w");
3822 assert(chomp(" hello world", " he") == " hello world");
3823 assert(chomp("", "hello") == "");
3826 assert(chomp("hello\xFE", "\r") == "hello\xFE");
3829 StringTypeOf!Range chomp(Range)(auto ref Range str)
3832 return chomp!(StringTypeOf!Range)(str);
3835 StringTypeOf!Range chomp(Range, C2)(auto ref Range str, const(C2)[] delimiter)
3838 return chomp!(StringTypeOf!Range, C2)(str, delimiter);
3843 assert(testAliasedString!chomp(" hello world \n\r"));
3844 assert(testAliasedString!chomp(" hello world", "orld"));
3857 assert(chomp(cast(S) null) is null);
3858 assert(chomp(to!S("hello")) == "hello");
3859 assert(chomp(to!S("hello\n")) == "hello");
3860 assert(chomp(to!S("hello\r")) == "hello");
3861 assert(chomp(to!S("hello\r\n")) == "hello");
3862 assert(chomp(to!S("hello\n\r")) == "hello\n");
3863 assert(chomp(to!S("hello\n\n")) == "hello\n");
3864 assert(chomp(to!S("hello\r\r")) == "hello\r");
3865 assert(chomp(to!S("hello\nxxx\n")) == "hello\nxxx");
3866 assert(chomp(to!S("hello\u2028")) == "hello");
3867 assert(chomp(to!S("hello\u2029")) == "hello");
3868 assert(chomp(to!S("hello\u0085")) == "hello");
3869 assert(chomp(to!S("hello\u2028\u2028")) == "hello\u2028");
3870 assert(chomp(to!S("hello\u2029\u2029")) == "hello\u2029");
3871 assert(chomp(to!S("hello\u2029\u2129")) == "hello\u2029\u2129");
3872 assert(chomp(to!S("hello\u2029\u0185")) == "hello\u2029\u0185");
3877 assert(chomp(cast(S) null, cast(T) null) is null);
3878 assert(chomp(to!S("hello\n"), cast(T) null) == "hello");
3879 assert(chomp(to!S("hello"), to!T("o")) == "hell");
3880 assert(chomp(to!S("hello"), to!T("p")) == "hello");
3882 assert(chomp(to!S("hello"), cast(T) null) == "hello");
3883 assert(chomp(to!S("hello"), to!T("llo")) == "he");
3884 assert(chomp(to!S("\uFF28ello"), to!T("llo")) == "\uFF28e");
3885 assert(chomp(to!S("\uFF28el\uFF4co"), to!T("l\uFF4co")) == "\uFF28e");
3893 assert(chomp("hello world\r\n" .byChar ).array == "hello world");
3894 assert(chomp("hello world\r\n"w.byWchar).array == "hello world"w);
3895 assert(chomp("hello world\r\n"d.byDchar).array == "hello world"d);
3897 assert(chomp("hello world"d.byDchar, "ld").array == "hello wor"d);
3899 assert(chomp("hello\u2020" .byChar , "\u2020").array == "hello");
3900 assert(chomp("hello\u2020"d.byDchar, "\u2020"d).array == "hello"d);
7015 line = line[line.chomp().length .. $];