Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# right function

    /// <summary>Get substring of specified number of characters on the right.
	/// There is no built-in 'Right' function in C#</summary>
    public static string Right(this string value, int length)
    {
        if (String.IsNullOrEmpty(value)) return string.Empty;
        return value.Length <= length ? value : value.Substring(value.Length - length);
    }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #function
ADD COMMENT
Topic
Name
4+5 =