Show / Hide Table of Contents

Class CharEx

Class containing some extension methods for System.Char.

Inheritance
System.Object
CharEx
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace:Extend
Assembly:Extend.dll
Syntax
public static class CharEx

Methods

| Improve this Doc View Source

IsDigit(Char)

Indicates whether the specified Unicode character is categorized as a decimal digit.

Declaration
public static bool IsDigit(this char c)
Parameters
Type Name Description
System.Char c

The Unicode character to evaluate.

Returns
Type Description
System.Boolean

True if the given char is a decimal digit, otherwise false.

| Improve this Doc View Source

IsLetter(Char)

Indicates whether the specified Unicode character is categorized as a Unicode letter.

Declaration
public static bool IsLetter(this char c)
Parameters
Type Name Description
System.Char c

The Unicode character to evaluate.

Returns
Type Description
System.Boolean

True if the given char is a letter, otherwise false.

| Improve this Doc View Source

IsLetterOrDigit(Char)

Indicates whether the specified Unicode character is categorized as a letter or a decimal digit.

Declaration
public static bool IsLetterOrDigit(this char c)
Parameters
Type Name Description
System.Char c

The Unicode character to evaluate.

Returns
Type Description
System.Boolean

True if the given char is a letter or a decimal digit, otherwise false.

| Improve this Doc View Source

IsLower(Char)

Indicates whether the specified Unicode character is categorized as a lowercase letter.

Declaration
public static bool IsLower(this char c)
Parameters
Type Name Description
System.Char c

The Unicode character to evaluate.

Returns
Type Description
System.Boolean

True if the given char is a lowercase letter, otherwise false.

| Improve this Doc View Source

IsNumber(Char)

Indicates whether the specified Unicode character is categorized as a number.

Declaration
public static bool IsNumber(this char c)
Parameters
Type Name Description
System.Char c

The Unicode character to evaluate.

Returns
Type Description
System.Boolean

True if the given char is a number, otherwise false.

| Improve this Doc View Source

IsUpper(Char)

Indicates whether the specified Unicode character is categorized as an uppercase letter.

Declaration
public static bool IsUpper(this char c)
Parameters
Type Name Description
System.Char c

The Unicode character to evaluate.

Returns
Type Description
System.Boolean

True if the given char is an uppercase letter, otherwise false.

| Improve this Doc View Source

IsWhiteSpace(Char)

Indicates whether the specified Unicode character is categorized as white space.

Declaration
public static bool IsWhiteSpace(this char c)
Parameters
Type Name Description
System.Char c

The Unicode character to evaluate.

Returns
Type Description
System.Boolean

True if the given char is a white space, otherwise false.

| Improve this Doc View Source

Repeat(Char, Int32)

Repeats the given Char the specified number of times.

Declaration
public static string Repeat(this char c, int repeatCount)
Parameters
Type Name Description
System.Char c

The Char to repeat.

System.Int32 repeatCount

Number of repeats.

Returns
Type Description
System.String

The repeated Char as String.

Exceptions
Type Condition
System.ArgumentOutOfRangeException

repeatCount is less than zero.

| Improve this Doc View Source

ToLower(Char)

Converts the value of a Unicode character to its lowercase equivalent.

Declaration
public static char ToLower(this char c)
Parameters
Type Name Description
System.Char c

The Unicode character to convert.

Returns
Type Description
System.Char

The lowercase equivalent of c, or the unchanged value of c, if c is already lowercase or not alphabetic.

| Improve this Doc View Source

ToUpper(Char)

Converts the value of a Unicode character to its uppercase equivalent.

Declaration
public static char ToUpper(this char c)
Parameters
Type Name Description
System.Char c

The Unicode character to convert.

Returns
Type Description
System.Char

The uppercase equivalent of c, or the unchanged value of c if c is already uppercase, has no uppercase equivalent, or is not alphabetic.

  • Improve this Doc
  • View Source
Back to top Copyright © 2015-2016 Microsoft
Generated by DocFX