-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extract korlibs-serialization-csv and korlibs-serialization-toml (#2180)
- Loading branch information
Showing
12 changed files
with
64 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import korlibs.* | ||
|
||
description = "Korlibs CSV Serialization Library" | ||
|
||
project.extensions.extraProperties.properties.apply { | ||
applyProjectProperties( | ||
"https://raw.githubusercontent.com/korlibs/korge/main/korlibs-serialization-csv", | ||
"Public Domain", | ||
"https://raw.githubusercontent.com/korlibs/korge/main/korlibs-serialization-csv/LICENSE" | ||
) | ||
} | ||
|
||
|
||
dependencies { | ||
commonMainApi(project(":korlibs-util")) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import korlibs.* | ||
|
||
description = "Korlibs TOML Serialization Library" | ||
|
||
project.extensions.extraProperties.properties.apply { | ||
applyProjectProperties( | ||
"https://raw.githubusercontent.com/korlibs/korge/main/korlibs-serialization-toml", | ||
"Public Domain", | ||
"https://raw.githubusercontent.com/korlibs/korge/main/korlibs-serialization-toml/LICENSE" | ||
) | ||
} | ||
|
||
dependencies { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package korlibs.util | ||
|
||
interface SimpleStrReader { | ||
val hasMore: Boolean | ||
fun readChar(): Char | ||
fun peekChar(): Char | ||
|
||
companion object { | ||
private class Impl(val str: String, var pos: Int) : SimpleStrReader { | ||
override val hasMore: Boolean get() = pos < str.length | ||
|
||
override fun readChar(): Char = peekChar().also { pos++ } | ||
override fun peekChar(): Char = str.getOrElse(pos) { '\u0000' } | ||
} | ||
operator fun invoke(str: String, pos: Int = 0): SimpleStrReader = Impl(str, pos) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters