Provide some useful classes and functions for Kotlin multiplatform utilities Based on de.rdvsb.kmapi
- added KmProc.pipeSystem()
- added KmProc system()/pipeSystem() make last call to processLine() with LineFrom.EOP (EndOfProcess)
- added String.abbreviate((maxLen: Int, appendIfLonger: String = "...")
- added Collection.padStart(minSize: Int, padWith: T): List
- added String.parseMMSS(): Duration?
- added String.parseHHMM(): Duration? ``### 0.1.21
- added Collection.padEnd(minSize: Int, padWith: T): List
- added tag parameter to logMessageNested(): Boolean
- logMessageNestedLine(): Boolean // extract timestamp msgId and separator from single line msg (log stdout from an external command call)
- logMessageNested(): Boolean // extract timestamp msgId and separator from possibly multiline msg (log stdout from an external command call)
- logMessage.isStdWithTimestamp: Boolean // emit log to stdout/stderr with timestamp
- de.rdvsb.kmapi.File renamed to de.rdvsb.kmapi.KmFile
Module | Common | JVM | NativeLinux | NativeMingw |
---|---|---|---|---|
Args | x | x | x | x |
logMessage | x | x | x | x |
KmFile | x | x | x | x |
InputStream | x | x | - | - |
OutputStream | x | x | - | - |
KmProcess | x | x | - | - |
StringUtil | x | x | x | x |
DateTime | x | x | x | x |
- Ability to write these utilities in a platform independent fashion
- Facilitate the creation of script like utilities (e.g. alternative or replacement of Bash, Perl, Python scripts)
- Develop using the JVM, deploy as native
- Support mobile platforms
- Support Web platforms
- Native
- JVM
- Server
- Desktop
- BasicGetArgs
- logMessage
- String extensions
- This is a work in progress. Functionality will be added when needed
- Prefer functionality of the Kotlin standard library, as long as it is implemented for the JVM and Native target
Apache 2.0