Skip to content

Commit 0df720c

Browse files
committed
Add extension for CharSequence
1 parent 37c301e commit 0df720c

File tree

1 file changed

+2
-0
lines changed
  • omegatypes/src/main/java/com/omega_r/libs/omegatypes

1 file changed

+2
-0
lines changed

omegatypes/src/main/java/com/omega_r/libs/omegatypes/Text.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,4 +319,6 @@ operator fun Text.plus(string: String): Text {
319319

320320
fun String.toText(textStyle: TextStyle? = null) = Text.from(this, textStyle)
321321

322+
fun CharSequence.toText(textStyle: TextStyle? = null) = Text.from(this, textStyle)
323+
322324
operator fun Text.plus(textStyle: TextStyle) = Text.from(this, textStyle = textStyle)

0 commit comments

Comments
 (0)