Skip to content

Commit 8f93526

Browse files
committed
Version 0.4.0
1 parent 1b30575 commit 8f93526

File tree

3 files changed

+49
-2
lines changed

3 files changed

+49
-2
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Changelog
22

3+
## [0.4.0] - 2023-01-31
4+
### Changed
5+
- `CodePoints.toChars(Int, CharArray, Int)` is now bug-compatible with `java.lang.Character.toChars(int, char[], int)`.
6+
Using an offset of -1 will lead to an exception, but the first element of the destination might be modified.
7+
8+
### Added
9+
- Support for MIPS targets
10+
- Separate library `kotlin-codepoints-deluxe` that builds a nicer API on top of `kotlin-codepoints`
11+
312
## [0.3.0] - 2023-01-24
413
### Changed
514
- Changed JVM target version from 11 to 1.8

README.md

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,20 @@ kotlin-codepoints is distributed through Maven Central.
1010

1111
```kotlin
1212
dependencies {
13-
implementation("de.cketti.unicode:kotlin-codepoints:0.3.0")
13+
// Basic API
14+
implementation("de.cketti.unicode:kotlin-codepoints:0.4.0")
15+
16+
// or
17+
18+
// Nice API
19+
implementation("de.cketti.unicode:kotlin-codepoints-deluxe:0.4.0")
1420
}
1521
```
1622

1723
## Features
1824

25+
### kotlin-codepoints
26+
1927
This library aims to make some methods of the Java standard library available to Kotlin multiplatform projects.
2028

2129
Methods found in `java.lang.String`:
@@ -42,6 +50,36 @@ Methods found in `java.lang.Character`:
4250
On the JVM the platform implementation is used. On all other platforms the
4351
[implementation in this library](src/commonImplementation/kotlin) is used.
4452

53+
### kotlin-codepoints-deluxe
54+
55+
This library builds on top of `kotlin-codepoints`. It adds a the `CodePoint` class to make working with code points a
56+
bit less painful.
57+
58+
Until someone gets around to building and publishing proper documentation,
59+
see [CodePoint.kt](https://github.com/cketti/kotlin-codepoints/blob/main/kotlin-codepoints-deluxe/src/commonMain/kotlin/CodePoint.kt)
60+
to get and idea of what's available.
61+
62+
#### Example:
63+
```kotlin
64+
val text = "🦕&🦖"
65+
66+
for (codePoint in text.codePointSequence()) {
67+
print("code point: $codePoint, char count: ${codePoint.charCount}")
68+
69+
if (codePoint.isBasic) {
70+
println(" - boring!")
71+
} else {
72+
println()
73+
}
74+
}
75+
76+
// Output:
77+
// -------
78+
// code point: U+1F995, char count: 2
79+
// code point: U+0026, char count: 1 - boring!
80+
// code point: U+1F996, char count: 2
81+
```
82+
4583

4684
## License
4785

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
GROUP=de.cketti.unicode
2-
VERSION_NAME=0.4.0-SNAPSHOT
2+
VERSION_NAME=0.4.0
33

44
POM_INCEPTION_YEAR=2023
55

0 commit comments

Comments
 (0)