AutoCompletionUtils.ktfilter(list: List<String>?, search: String?): List<String>@JvmStatic public entry point.
emptyList() if list is null.list if search is null or blank.search on spaces into tokens, filters list to items containing every token (case-insensitive), and returns the result sorted lexicographically.containsAll(str: String, strings: List<String>): Booleaninternal helper. Iterates over token list; returns false as soon as any token is not found in str (ignoring case). Returns true if all tokens match.
The multi-word AND-filter design is suited for autocomplete where users type multiple terms (e.g., "project acme" matching "Acme Project 2024"). The internal visibility of containsAll keeps the inner logic testable within the module without exposing it. The @JvmStatic annotation ensures Java callers can use AutoCompletionUtils.filter(...) without accessing the companion object.
String.contains), not tokenized or prefix-based matching. It is suitable for small-to-medium datasets loaded client-side but may not scale for large datasets.868d6abb7 2025 -> 2026 63081666f Source file headers: 2024-> 2025. b6092df09 Copyright 2023 -> 2024 ab45d51fa Copyright 2001-2022 -> 2001-2023. 5f7ef41b8 Copyright 2021 -> 2022 d875be4d4 TimesheetDao: Java - Kotlin ceb63e8a1 Source code header: (C) 2001-2021. 7c79f1922 Copyright of source header -> 2020. 73a9755df More code cleanup (collapsed catch blocks, replaced deprecated classes, Collections.sort -> List.sort) 000ca723d Remove pointless boolean expressions (business) dd5ca38ac CopyRight of all java file-header updated or created.