Kotlin output is line wrapping strings
See original GitHub issueI assume this happens in Java as well but it appears the plugin is introducing new lines, possibly as some form of automatic line-wrapping on spaces.
Simple example:
val alphabet = (65..90)
.map { it.toChar() }
.joinToString()
buildConfigField("String", "Example", "\"$alphabet\"")
Results in:
object BuildConfig {
const val Example: String = "A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V,
W, X, Y, Z"
}
Note the newline breaks the string and the comma after V is at index 99 making me believe that something is forcing 100 character wrapping.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:10 (5 by maintainers)
Top Results From Across the Web
Java code for wrapping text lines to a max line width
/**Wraps a source String into a series of lines having a maximum specified length. The source is * wrapped at: spaces, horizontal tabs,...
Read more >Kotlin String and String Templates (With Examples) - Programiz
In this article, you will learn about Kotlin strings, string templates, and few commonly used string properties and functions with the help of...
Read more >String - Kotlin Programming Language
Creates an Iterable instance that wraps the original char sequence returning its characters when ... Prepends indent to every line of the original...
Read more >String in Kotlin - Medium
Similar to Python, we can construct a raw string object by wrapping our string in triple double quotes """ . Inside these quotes,...
Read more >String Templates and Multiline Strings in Kotlin - Knoldus Blogs
Kotlin has an awesome feature called string templates that allows strings to contain template expressions.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Feel free to open a PR for the README.md, you know exactly what we should put on it 😅
Oh hey @ToxicBakery, thank’s a lot! I just didn’t get your solution, it now works!