CompositeStringResolver
data class CompositeStringResolver(resolvers: List<StringResolver>, separator: StringResolver) : StringResolver
Content copied to clipboard
A StringResolver that creates a string from the given resolvers, separated using separator.
For example:
val composite = CompositeStringResolver(
listOf(
StaticStringResolver("Hello"),
StaticStringResolver("world")
)
)
// Will equal "Hello world"
composite.get(context)
Content copied to clipboard
Do keep RTL languages in mind when selecting the separator, you probably want to use a ResourceStringResolver if your separator isn't a palindrome.
Resolvers resulting in empty strings are ignored.
Constructors
Link copied to clipboard
fun CompositeStringResolver(resolvers: List<StringResolver>, separator: StringResolver = StaticStringResolver(" "))
Content copied to clipboard