All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.autonomousapps.internal.utils.text.kt Maven / Gradle / Ivy

There is a newer version: 2.0.2
Show newest version
package com.autonomousapps.internal.utils

/**
 * Appends value to the given Appendable and simple `\n` line separator after it.
 *
 * Always using the same line separator on all systems to allow for reproducible outputs.
 *
 * Borrowed from `org.gradle.kotlin.dsl.support`.
 */
internal fun Appendable.appendReproducibleNewLine(value: CharSequence = ""): Appendable {
  assert('\r' !in value) {
    "Unexpected line ending in string."
  }
  return append(value).append("\n")
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy