-
public final class StringBuilderExtKt
-
-
Method Summary
Modifier and Type Method Description final static <ERROR CLASS>appendIfNotEmpty(StringBuilder $self, String str)This utility function helps to replace joinToString calls with more efficient StringBuilder methods calls. final static <ERROR CLASS>appendIfNotEmpty(StringBuilder $self, Character char)This utility function helps to replace joinToString calls with more efficient StringBuilder methods calls. -
-
Method Detail
-
appendIfNotEmpty
final static <ERROR CLASS> appendIfNotEmpty(StringBuilder $self, String str)
This utility function helps to replace joinToString calls with more efficient StringBuilder methods calls. In case when content should be separated with some separator, it's handy to add it in front of a new string only if buffer already contains some data.
- Parameters:
str- string that should be added to the buffer only if it already contains some data.
-
appendIfNotEmpty
final static <ERROR CLASS> appendIfNotEmpty(StringBuilder $self, Character char)
This utility function helps to replace joinToString calls with more efficient StringBuilder methods calls. In case when content should be separated with some separator, it's handy to add it in front of a new string only if buffer already contains some data.
- Parameters:
char- char that should be added to the buffer only if it already contains some data.
-
-
-
-