Class StringExtensions
Extension methods for strings
Inheritance
System.Object
StringExtensions
Namespace: ImageVault.Common.Lib
Assembly: ImageVault.Common.dll
Syntax
public static class StringExtensions : Object
Methods
ToCamelCase(String)
Creates a camel case string
Declaration
public static string ToCamelCase(this string s)
Parameters
Type | Name | Description |
---|---|---|
System.String | s |
Returns
Type | Description |
---|---|
System.String |
ToIntArray(String, Char)
Converts the supplied string to an array of integers
Declaration
public static int[] ToIntArray(this string str, char separator = ',')
Parameters
Type | Name | Description |
---|---|---|
System.String | str | |
System.Char | separator | The separator to use, default comma (,) |
Returns
Type | Description |
---|---|
System.Int32[] | The parsed int array |
Exceptions
Type | Condition |
---|---|
System.FormatException | If the supplied string does not consist of integers in correct format |
System.OverflowException | If the supplied integers are too large/small for System.Int32 values |
UppercaseFirst(IEnumerable<String>)
Uppercases all strings in the list
Declaration
public static IEnumerable<string> UppercaseFirst(this IEnumerable<string> list)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | list |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> |
UppercaseFirst(String)
Uppercase the first letter in the supplied string
Declaration
public static string UppercaseFirst(this string str)
Parameters
Type | Name | Description |
---|---|---|
System.String | str |
Returns
Type | Description |
---|---|
System.String |