string.RemoveAllWhitespaces()

Here are the examples of the csharp api string.RemoveAllWhitespaces() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

3 Examples 7

19 Source : RegexUtils.cs
with Apache License 2.0
from VahidN

public static bool ContainsFarsi(this string? txt, bool allowWhitespace = false)
        {
            if (string.IsNullOrEmpty(txt))
            {
                return false;
            }

            var input = txt.StripHtmlTags().Replace(",", "", StringComparison.OrdinalIgnoreCase);
            if (allowWhitespace)
            {
                input = input.RemoveAllWhitespaces();
            }
            return _matchArabicHebrew.IsMatch(input);
        }

19 Source : RegexUtils.cs
with Apache License 2.0
from VahidN

public static bool ContainsOnlyPersianNumbers(this string? text, bool allowWhitespace = false)
        {
            if (string.IsNullOrEmpty(text))
            {
                return false;
            }

            var input = text.StripHtmlTags();
            if (allowWhitespace)
            {
                input = input.RemoveAllWhitespaces();
            }
            return _matchOnlyPersianNumbersRange.IsMatch(input);
        }

19 Source : RegexUtils.cs
with Apache License 2.0
from VahidN

public static bool ContainsOnlyFarsiLetters(this string? txt, bool allowWhitespace = false)
        {
            if (string.IsNullOrEmpty(txt))
            {
                return false;
            }

            var input = txt.StripHtmlTags().Replace(",", "", StringComparison.OrdinalIgnoreCase);
            if (allowWhitespace)
            {
                input = input.RemoveAllWhitespaces();
            }
            return _matchOnlyPersianLetters.IsMatch(input);
        }