-
public final class Strings
-
-
Method Summary
Modifier and Type Method Description static StringtoEnvVar(String string)static Stringjoin(CharSequence joiner, Array<CharSequence> strings)static Stringreplace(String str, String delimiter, String replacement)static StringreplaceFirst(String str, String delimiter, String replacement)static StringpropertyNameToEnvironmentVariableName(String setting)Converts the property name, e.g. static StringsystemPropertyNameToEnvironmentVariableName(String setting)Converts the system property name, e.g. static StringpropertyNameToSystemPropertyName(String setting)Converts the property name, e.g. static StringnormalizedHeaderTag(String str)static Stringtrim(String string)static Stringsha256(String input)static Stringrandom(int length)Generates a random string of the given length from lowercase characters a-z -
-
Method Detail
-
join
static String join(CharSequence joiner, Array<CharSequence> strings)
-
replaceFirst
static String replaceFirst(String str, String delimiter, String replacement)
-
propertyNameToEnvironmentVariableName
@NonNull() static String propertyNameToEnvironmentVariableName(String setting)
Converts the property name, e.g. 'service.name' into a public environment variable name, e.g.`DD_SERVICE_NAME`.
- Parameters:
setting- The setting name, e.g.
-
systemPropertyNameToEnvironmentVariableName
@NonNull() static String systemPropertyNameToEnvironmentVariableName(String setting)
Converts the system property name, e.g. 'dd.service.name' into a public environment variablename, e.g. `DD_SERVICE_NAME`.
- Parameters:
setting- The system property name, e.g.
-
propertyNameToSystemPropertyName
@NonNull() static String propertyNameToSystemPropertyName(String setting)
Converts the property name, e.g. 'service.name' into a public system property name, e.g.`dd.service.name`.
- Parameters:
setting- The setting name, e.g.
-
normalizedHeaderTag
@NonNull() static String normalizedHeaderTag(String str)
-
-
-
-