Skip to content

Commit 8cfb5a9

Browse files
authored
Add UTF8.CharPreProcessor extension functions for partial text calculations (#239)
1 parent b5e6dc6 commit 8cfb5a9

3 files changed

Lines changed: 194 additions & 0 deletions

File tree

library/utf8/api/utf8.api

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,29 +30,41 @@ public class io/matthewnelson/encoding/utf8/UTF8$CharPreProcessor {
3030
protected fun replacementSize ()I
3131
protected final fun setCurrentSize (J)V
3232
public static final fun sizeOf (Ljava/lang/CharSequence;Lio/matthewnelson/encoding/utf8/UTF8$Config;)J
33+
public static final fun sizeOf (Ljava/lang/CharSequence;Lio/matthewnelson/encoding/utf8/UTF8$Config;II)J
3334
public static final fun sizeOf (Ljava/lang/CharSequence;Lio/matthewnelson/encoding/utf8/UTF8$ReplacementStrategy;)J
35+
public static final fun sizeOf (Ljava/lang/CharSequence;Lio/matthewnelson/encoding/utf8/UTF8$ReplacementStrategy;II)J
3436
public static final fun sizeOf (Ljava/lang/CharSequence;Lio/matthewnelson/encoding/utf8/UTF8;)J
37+
public static final fun sizeOf (Ljava/lang/CharSequence;Lio/matthewnelson/encoding/utf8/UTF8;II)J
3538
public static final fun sizeOf (Lkotlin/collections/CharIterator;Lio/matthewnelson/encoding/utf8/UTF8$Config;)J
3639
public static final fun sizeOf (Lkotlin/collections/CharIterator;Lio/matthewnelson/encoding/utf8/UTF8$ReplacementStrategy;)J
3740
public static final fun sizeOf (Lkotlin/collections/CharIterator;Lio/matthewnelson/encoding/utf8/UTF8;)J
3841
public static final fun sizeOf ([CLio/matthewnelson/encoding/utf8/UTF8$Config;)J
42+
public static final fun sizeOf ([CLio/matthewnelson/encoding/utf8/UTF8$Config;II)J
3943
public static final fun sizeOf ([CLio/matthewnelson/encoding/utf8/UTF8$ReplacementStrategy;)J
44+
public static final fun sizeOf ([CLio/matthewnelson/encoding/utf8/UTF8$ReplacementStrategy;II)J
4045
public static final fun sizeOf ([CLio/matthewnelson/encoding/utf8/UTF8;)J
46+
public static final fun sizeOf ([CLio/matthewnelson/encoding/utf8/UTF8;II)J
4147
}
4248

4349
public final class io/matthewnelson/encoding/utf8/UTF8$CharPreProcessor$Companion {
4450
public final fun of (Lio/matthewnelson/encoding/utf8/UTF8$Config;)Lio/matthewnelson/encoding/utf8/UTF8$CharPreProcessor;
4551
public final fun of (Lio/matthewnelson/encoding/utf8/UTF8$ReplacementStrategy;)Lio/matthewnelson/encoding/utf8/UTF8$CharPreProcessor;
4652
public final fun of (Lio/matthewnelson/encoding/utf8/UTF8;)Lio/matthewnelson/encoding/utf8/UTF8$CharPreProcessor;
4753
public final fun sizeOf (Ljava/lang/CharSequence;Lio/matthewnelson/encoding/utf8/UTF8$Config;)J
54+
public final fun sizeOf (Ljava/lang/CharSequence;Lio/matthewnelson/encoding/utf8/UTF8$Config;II)J
4855
public final fun sizeOf (Ljava/lang/CharSequence;Lio/matthewnelson/encoding/utf8/UTF8$ReplacementStrategy;)J
56+
public final fun sizeOf (Ljava/lang/CharSequence;Lio/matthewnelson/encoding/utf8/UTF8$ReplacementStrategy;II)J
4957
public final fun sizeOf (Ljava/lang/CharSequence;Lio/matthewnelson/encoding/utf8/UTF8;)J
58+
public final fun sizeOf (Ljava/lang/CharSequence;Lio/matthewnelson/encoding/utf8/UTF8;II)J
5059
public final fun sizeOf (Lkotlin/collections/CharIterator;Lio/matthewnelson/encoding/utf8/UTF8$Config;)J
5160
public final fun sizeOf (Lkotlin/collections/CharIterator;Lio/matthewnelson/encoding/utf8/UTF8$ReplacementStrategy;)J
5261
public final fun sizeOf (Lkotlin/collections/CharIterator;Lio/matthewnelson/encoding/utf8/UTF8;)J
5362
public final fun sizeOf ([CLio/matthewnelson/encoding/utf8/UTF8$Config;)J
63+
public final fun sizeOf ([CLio/matthewnelson/encoding/utf8/UTF8$Config;II)J
5464
public final fun sizeOf ([CLio/matthewnelson/encoding/utf8/UTF8$ReplacementStrategy;)J
65+
public final fun sizeOf ([CLio/matthewnelson/encoding/utf8/UTF8$ReplacementStrategy;II)J
5566
public final fun sizeOf ([CLio/matthewnelson/encoding/utf8/UTF8;)J
67+
public final fun sizeOf ([CLio/matthewnelson/encoding/utf8/UTF8;II)J
5668
}
5769

5870
public final class io/matthewnelson/encoding/utf8/UTF8$Config : io/matthewnelson/encoding/core/EncoderDecoder$Config {

library/utf8/api/utf8.klib.api

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,20 @@ open class io.matthewnelson.encoding.utf8/UTF8 : io.matthewnelson.encoding.core/
6161
final object Companion { // io.matthewnelson.encoding.utf8/UTF8.CharPreProcessor.Companion|null[0]
6262
final fun (kotlin.collections/CharIterator).sizeUTF8(io.matthewnelson.encoding.utf8/UTF8.ReplacementStrategy): kotlin/Long // io.matthewnelson.encoding.utf8/UTF8.CharPreProcessor.Companion.sizeUTF8|sizeUTF8@kotlin.collections.CharIterator(io.matthewnelson.encoding.utf8.UTF8.ReplacementStrategy){}[0]
6363
final fun (kotlin/CharArray).sizeUTF8(io.matthewnelson.encoding.utf8/UTF8.ReplacementStrategy): kotlin/Long // io.matthewnelson.encoding.utf8/UTF8.CharPreProcessor.Companion.sizeUTF8|sizeUTF8@kotlin.CharArray(io.matthewnelson.encoding.utf8.UTF8.ReplacementStrategy){}[0]
64+
final fun (kotlin/CharArray).sizeUTF8(io.matthewnelson.encoding.utf8/UTF8.ReplacementStrategy, kotlin/Int, kotlin/Int): kotlin/Long // io.matthewnelson.encoding.utf8/UTF8.CharPreProcessor.Companion.sizeUTF8|sizeUTF8@kotlin.CharArray(io.matthewnelson.encoding.utf8.UTF8.ReplacementStrategy;kotlin.Int;kotlin.Int){}[0]
6465
final fun (kotlin/CharSequence).sizeUTF8(io.matthewnelson.encoding.utf8/UTF8.ReplacementStrategy): kotlin/Long // io.matthewnelson.encoding.utf8/UTF8.CharPreProcessor.Companion.sizeUTF8|sizeUTF8@kotlin.CharSequence(io.matthewnelson.encoding.utf8.UTF8.ReplacementStrategy){}[0]
66+
final fun (kotlin/CharSequence).sizeUTF8(io.matthewnelson.encoding.utf8/UTF8.ReplacementStrategy, kotlin/Int, kotlin/Int): kotlin/Long // io.matthewnelson.encoding.utf8/UTF8.CharPreProcessor.Companion.sizeUTF8|sizeUTF8@kotlin.CharSequence(io.matthewnelson.encoding.utf8.UTF8.ReplacementStrategy;kotlin.Int;kotlin.Int){}[0]
6567
final fun of(io.matthewnelson.encoding.utf8/UTF8.ReplacementStrategy): io.matthewnelson.encoding.utf8/UTF8.CharPreProcessor // io.matthewnelson.encoding.utf8/UTF8.CharPreProcessor.Companion.of|of(io.matthewnelson.encoding.utf8.UTF8.ReplacementStrategy){}[0]
6668
final inline fun (kotlin.collections/CharIterator).sizeUTF8(io.matthewnelson.encoding.utf8/UTF8): kotlin/Long // io.matthewnelson.encoding.utf8/UTF8.CharPreProcessor.Companion.sizeUTF8|sizeUTF8@kotlin.collections.CharIterator(io.matthewnelson.encoding.utf8.UTF8){}[0]
6769
final inline fun (kotlin.collections/CharIterator).sizeUTF8(io.matthewnelson.encoding.utf8/UTF8.Config): kotlin/Long // io.matthewnelson.encoding.utf8/UTF8.CharPreProcessor.Companion.sizeUTF8|sizeUTF8@kotlin.collections.CharIterator(io.matthewnelson.encoding.utf8.UTF8.Config){}[0]
6870
final inline fun (kotlin/CharArray).sizeUTF8(io.matthewnelson.encoding.utf8/UTF8): kotlin/Long // io.matthewnelson.encoding.utf8/UTF8.CharPreProcessor.Companion.sizeUTF8|sizeUTF8@kotlin.CharArray(io.matthewnelson.encoding.utf8.UTF8){}[0]
71+
final inline fun (kotlin/CharArray).sizeUTF8(io.matthewnelson.encoding.utf8/UTF8, kotlin/Int, kotlin/Int): kotlin/Long // io.matthewnelson.encoding.utf8/UTF8.CharPreProcessor.Companion.sizeUTF8|sizeUTF8@kotlin.CharArray(io.matthewnelson.encoding.utf8.UTF8;kotlin.Int;kotlin.Int){}[0]
6972
final inline fun (kotlin/CharArray).sizeUTF8(io.matthewnelson.encoding.utf8/UTF8.Config): kotlin/Long // io.matthewnelson.encoding.utf8/UTF8.CharPreProcessor.Companion.sizeUTF8|sizeUTF8@kotlin.CharArray(io.matthewnelson.encoding.utf8.UTF8.Config){}[0]
73+
final inline fun (kotlin/CharArray).sizeUTF8(io.matthewnelson.encoding.utf8/UTF8.Config, kotlin/Int, kotlin/Int): kotlin/Long // io.matthewnelson.encoding.utf8/UTF8.CharPreProcessor.Companion.sizeUTF8|sizeUTF8@kotlin.CharArray(io.matthewnelson.encoding.utf8.UTF8.Config;kotlin.Int;kotlin.Int){}[0]
7074
final inline fun (kotlin/CharSequence).sizeUTF8(io.matthewnelson.encoding.utf8/UTF8): kotlin/Long // io.matthewnelson.encoding.utf8/UTF8.CharPreProcessor.Companion.sizeUTF8|sizeUTF8@kotlin.CharSequence(io.matthewnelson.encoding.utf8.UTF8){}[0]
75+
final inline fun (kotlin/CharSequence).sizeUTF8(io.matthewnelson.encoding.utf8/UTF8, kotlin/Int, kotlin/Int): kotlin/Long // io.matthewnelson.encoding.utf8/UTF8.CharPreProcessor.Companion.sizeUTF8|sizeUTF8@kotlin.CharSequence(io.matthewnelson.encoding.utf8.UTF8;kotlin.Int;kotlin.Int){}[0]
7176
final inline fun (kotlin/CharSequence).sizeUTF8(io.matthewnelson.encoding.utf8/UTF8.Config): kotlin/Long // io.matthewnelson.encoding.utf8/UTF8.CharPreProcessor.Companion.sizeUTF8|sizeUTF8@kotlin.CharSequence(io.matthewnelson.encoding.utf8.UTF8.Config){}[0]
77+
final inline fun (kotlin/CharSequence).sizeUTF8(io.matthewnelson.encoding.utf8/UTF8.Config, kotlin/Int, kotlin/Int): kotlin/Long // io.matthewnelson.encoding.utf8/UTF8.CharPreProcessor.Companion.sizeUTF8|sizeUTF8@kotlin.CharSequence(io.matthewnelson.encoding.utf8.UTF8.Config;kotlin.Int;kotlin.Int){}[0]
7278
final inline fun of(io.matthewnelson.encoding.utf8/UTF8): io.matthewnelson.encoding.utf8/UTF8.CharPreProcessor // io.matthewnelson.encoding.utf8/UTF8.CharPreProcessor.Companion.of|of(io.matthewnelson.encoding.utf8.UTF8){}[0]
7379
final inline fun of(io.matthewnelson.encoding.utf8/UTF8.Config): io.matthewnelson.encoding.utf8/UTF8.CharPreProcessor // io.matthewnelson.encoding.utf8/UTF8.CharPreProcessor.Companion.of|of(io.matthewnelson.encoding.utf8.UTF8.Config){}[0]
7480
}

0 commit comments

Comments
 (0)