Package org.bpsbits.kt.rest.utils.string
Class StringKt
-
- All Implemented Interfaces:
public final class StringKt
-
-
Field Summary
Fields Modifier and Type Field Description private final static BooleanmatchesTomcatCookieprivate final static BooleanmatchesISODateFormat
-
Method Summary
Modifier and Type Method Description final BooleangetMatchesTomcatCookie()final BooleangetMatchesISODateFormat()final static BooleanisValidISODate(String $self)final static UnitvalidateISODate(String $self)final static List<AcceptedLanguage>parseAcceptedLanguages(String $self)If string is Accept-Language header, parses it and returns a list of accepted languages. final static List<AcceptedLanguage>parseAcceptedLanguagesISO6391(String $self)If string is Accept-Language header, parses it and returns a list of accepted languages where language codes are ISO 639-1 codes and possible country codes are removed. final static StringdoubleQuoteIfContainsUppercase(String $self)final static StringsanitizePgFunctionName(String $self)final static StringintoPgFunctionQuery(String $self, Integer varsCount, String suffix)-
-
Method Detail
-
getMatchesTomcatCookie
final Boolean getMatchesTomcatCookie()
-
getMatchesISODateFormat
final Boolean getMatchesISODateFormat()
-
isValidISODate
final static Boolean isValidISODate(String $self)
-
validateISODate
final static Unit validateISODate(String $self)
-
parseAcceptedLanguages
final static List<AcceptedLanguage> parseAcceptedLanguages(String $self)
If string is Accept-Language header, parses it and returns a list of accepted languages.
Please note that this method does not validate the language codes. Please note that language code could be for example en or en-US. The prefix 'en' is an ISO 639-1 language code. The 'US' suffix is a country code that follows the ISO 3166-1 Alpha-2 standard.
-
parseAcceptedLanguagesISO6391
final static List<AcceptedLanguage> parseAcceptedLanguagesISO6391(String $self)
If string is Accept-Language header, parses it and returns a list of accepted languages where language codes are ISO 639-1 codes and possible country codes are removed.
-
doubleQuoteIfContainsUppercase
final static String doubleQuoteIfContainsUppercase(String $self)
-
sanitizePgFunctionName
final static String sanitizePgFunctionName(String $self)
-
intoPgFunctionQuery
final static String intoPgFunctionQuery(String $self, Integer varsCount, String suffix)
-
-
-
-