Class StringFormatting
Inheritance
System.Object
StringFormatting
Assembly: LymeTemplateApi.Code.dll
public static class StringFormatting : object
Methods
Declaration
public static string AddOrdinal(int num)
Parameters
Type |
Name |
Description |
System.Int32 |
num |
|
Returns
Type |
Description |
System.String |
|
Declaration
public static string FormatDate(DateTime? d, string naText = "n/a")
Parameters
Type |
Name |
Description |
System.Nullable<DateTime> |
d |
|
System.String |
naText |
|
Returns
Type |
Description |
System.String |
|
Declaration
public static string FormatFileSize(long bytes, bool si = false)
Parameters
Type |
Name |
Description |
System.Int64 |
bytes |
|
System.Boolean |
si |
|
Returns
Type |
Description |
System.String |
|
Declaration
public static string FormatPhone(string tenDigitPhoneNumber)
Parameters
Type |
Name |
Description |
System.String |
tenDigitPhoneNumber |
|
Returns
Type |
Description |
System.String |
|
Declaration
public static string FormatPotentiallyLargeNumber(int number)
Parameters
Type |
Name |
Description |
System.Int32 |
number |
|
Returns
Type |
Description |
System.String |
|
Declaration
public static string GetMonthFolderName(DateTime d)
Parameters
Type |
Name |
Description |
DateTime |
d |
|
Returns
Type |
Description |
System.String |
|
Declaration
public static string GetMonthName(int month)
Parameters
Type |
Name |
Description |
System.Int32 |
month |
|
Returns
Type |
Description |
System.String |
|
Declaration
public static string GetTimeStampString(DateTime? theDate = null, bool includeMilliseconds = false)
Parameters
Type |
Name |
Description |
System.Nullable<DateTime> |
theDate |
|
System.Boolean |
includeMilliseconds |
|
Returns
Type |
Description |
System.String |
|
Declaration
public static string StripIllegalFileCharacters(string textToClean)
Parameters
Type |
Name |
Description |
System.String |
textToClean |
|
Returns
Type |
Description |
System.String |
|