Class StringFormatter
This utility class is designed to make System.String related formating operations easier to work with.
Inheritance
Namespace: Cuemon
Assembly: Cuemon.Core.dll
Syntax
public static class StringFormatter
Methods
| Improve this DocFromDateTime(DateTime, DateTimeFormatPattern)
Returns a string expression representing a standardized date- and time value.
Declaration
public static string FromDateTime(DateTime value, DateTimeFormatPattern pattern)
Parameters
Type | Name | Description |
---|---|---|
System.DateTime | value | The System.DateTime value to be formatted. |
DateTimeFormatPattern | pattern | The standardized patterns to apply on |
Returns
Type | Description |
---|---|
System.String | Returns a string expression representing a date- and time value. |
FromDateTime(DateTime, DateTimeFormatPattern, IFormatProvider)
Returns a string expression representing a standardized date- and time value.
Declaration
public static string FromDateTime(DateTime value, DateTimeFormatPattern pattern, IFormatProvider provider)
Parameters
Type | Name | Description |
---|---|---|
System.DateTime | value | The System.DateTime value to be formatted. |
DateTimeFormatPattern | pattern | The standardized patterns to apply on |
System.IFormatProvider | provider | An System.IFormatProvider that supplies culture-specific formatting information. |
Returns
Type | Description |
---|---|
System.String | Returns a string expression representing a date- and time value. |
FromDateTime(DateTime, StandardizedDateTimeFormatPattern)
Returns a string expression representing a standardized date- and time value.
Declaration
public static string FromDateTime(DateTime value, StandardizedDateTimeFormatPattern pattern)
Parameters
Type | Name | Description |
---|---|---|
System.DateTime | value | The System.DateTime value to be formatted. |
StandardizedDateTimeFormatPattern | pattern | The standardized patterns to apply on |
Returns
Type | Description |
---|---|
System.String | Returns a string expression representing a date- and time value. |
FromDateTime(DateTime, StandardizedDateTimeFormatPattern, Byte)
Returns a string expression representing a standardized date- and time value.
Declaration
public static string FromDateTime(DateTime value, StandardizedDateTimeFormatPattern pattern, byte fractionalDecimalPlaces)
Parameters
Type | Name | Description |
---|---|---|
System.DateTime | value | The System.DateTime value to be formatted. |
StandardizedDateTimeFormatPattern | pattern | The standardized patterns to apply on |
System.Byte | fractionalDecimalPlaces | The amount of fractional decimal places to apply to the string expression. |
Returns
Type | Description |
---|---|
System.String | Returns a string expression representing a date- and time value. |