Utility class for efficient and fast StringBuilder manipulation. None of the methods create temporary or persistent objects. Memory allocation only happens when the StringBuilder needs more space.
More...
|
static void | AppendFloat (StringBuilder s, float number, int decimalCount) |
| Append a float to a Stringbuilder. More...
|
|
static void | AppendFloat (StringBuilder s, float number, int decimalCount, int digitCount) |
| Append an integer to a StringBuilder and include left padding. More...
|
|
static void | AppendFloatGrouped (StringBuilder s, float number, int decimalCount) |
| Append a float to a Stringbuilder and include digit group separators. More...
|
|
static void | AppendFloatGrouped (StringBuilder s, float number, int decimalCount, int digitCount) |
| Append an integer to a StringBuilder and include both left padding and digit group separators. More...
|
|
static void | AppendInt (StringBuilder s, int number) |
| Append an int to a StringBuilder. More...
|
|
static void | AppendInt (StringBuilder s, int number, int digitCount) |
| Append an integer to a StringBuilder and include left padding. More...
|
|
static void | AppendIntGrouped (StringBuilder s, int number) |
| Append an integer to a StringBuilder and include digit group separators. More...
|
|
static void | AppendIntGrouped (StringBuilder s, int number, int digitCount) |
| Append an integer to a StringBuilder and include both left padding and digit group separators. More...
|
|
static void | Reverse (StringBuilder s, int firstIndex, int lastIndex) |
| Reverse a portion of a StringBuilder. More...
|
|
|
static char | decimalSeparator = '.' |
| Character used as decimal separator. Change this if you don't want to use '.'. More...
|
|
static char | groupSeparator = ',' |
| Character used as digit group separatator. Change this is you don't want to use ','. More...
|
|
static char | padding = '0' |
| Character used as padding. Change this is you don't want to use '0'. More...
|
|
Utility class for efficient and fast StringBuilder manipulation. None of the methods create temporary or persistent objects. Memory allocation only happens when the StringBuilder needs more space.
static void CatlikeCoding.Utilities.StringBuilderUtility.AppendFloat |
( |
StringBuilder |
s, |
|
|
float |
number, |
|
|
int |
decimalCount |
|
) |
| |
|
static |
Append a float to a Stringbuilder.
- Parameters
-
s | A StringBuilder. |
number | A float. |
decimalCount | How many decimals to show. |
static void CatlikeCoding.Utilities.StringBuilderUtility.AppendFloat |
( |
StringBuilder |
s, |
|
|
float |
number, |
|
|
int |
decimalCount, |
|
|
int |
digitCount |
|
) |
| |
|
static |
Append an integer to a StringBuilder and include left padding.
- Parameters
-
s | A StringBuilder. |
number | A float. |
decimalCount | How many decimals to show. |
digitCount | How many digits should be shown. If number's integer part has fewer digits, it will be padded to the left. |
static void CatlikeCoding.Utilities.StringBuilderUtility.AppendFloatGrouped |
( |
StringBuilder |
s, |
|
|
float |
number, |
|
|
int |
decimalCount |
|
) |
| |
|
static |
Append a float to a Stringbuilder and include digit group separators.
- Parameters
-
s | A StringBuilder. |
number | A float. |
decimalCount | How many decimals to show. |
static void CatlikeCoding.Utilities.StringBuilderUtility.AppendFloatGrouped |
( |
StringBuilder |
s, |
|
|
float |
number, |
|
|
int |
decimalCount, |
|
|
int |
digitCount |
|
) |
| |
|
static |
Append an integer to a StringBuilder and include both left padding and digit group separators.
- Parameters
-
s | A StringBuilder. |
number | A float. |
decimalCount | How many decimals to show. |
digitCount | How many digits should be shown. If number's integer part has fewer digits, it will be padded to the left. |
static void CatlikeCoding.Utilities.StringBuilderUtility.AppendInt |
( |
StringBuilder |
s, |
|
|
int |
number |
|
) |
| |
|
static |
Append an int to a StringBuilder.
- Parameters
-
s | A StringBuilder. |
number | The int to append. |
static void CatlikeCoding.Utilities.StringBuilderUtility.AppendInt |
( |
StringBuilder |
s, |
|
|
int |
number, |
|
|
int |
digitCount |
|
) |
| |
|
static |
Append an integer to a StringBuilder and include left padding.
- Parameters
-
s | A StringBuilder. |
number | An int. |
digitCount | How many digits should be shown. If number has fewer digits, it will be padded to the left. |
static void CatlikeCoding.Utilities.StringBuilderUtility.AppendIntGrouped |
( |
StringBuilder |
s, |
|
|
int |
number |
|
) |
| |
|
static |
Append an integer to a StringBuilder and include digit group separators.
- Parameters
-
s | A StringBuilder. |
number | An int. |
static void CatlikeCoding.Utilities.StringBuilderUtility.AppendIntGrouped |
( |
StringBuilder |
s, |
|
|
int |
number, |
|
|
int |
digitCount |
|
) |
| |
|
static |
Append an integer to a StringBuilder and include both left padding and digit group separators.
- Parameters
-
s | A StringBuilder. |
number | An int. |
digitCount | How many digits should be shown. If number has fewer digits, it will be padded to the left. |
static void CatlikeCoding.Utilities.StringBuilderUtility.Reverse |
( |
StringBuilder |
s, |
|
|
int |
firstIndex, |
|
|
int |
lastIndex |
|
) |
| |
|
static |
Reverse a portion of a StringBuilder.
- Parameters
-
s | The StringBuilder to modify. |
firstIndex | Index of the first character to reverse. |
lastIndex | Index of the last character to reverse. |
char CatlikeCoding.Utilities.StringBuilderUtility.decimalSeparator = '.' |
|
static |
Character used as decimal separator. Change this if you don't want to use '.'.
char CatlikeCoding.Utilities.StringBuilderUtility.groupSeparator = ',' |
|
static |
Character used as digit group separatator. Change this is you don't want to use ','.
char CatlikeCoding.Utilities.StringBuilderUtility.padding = '0' |
|
static |
Character used as padding. Change this is you don't want to use '0'.