aboutsummaryrefslogtreecommitdiff
path: root/core/strings
diff options
context:
space:
mode:
authorJeroen van Rijn <Kelimion@users.noreply.github.com>2025-05-31 20:35:25 +0200
committerJeroen van Rijn <Kelimion@users.noreply.github.com>2025-05-31 20:35:25 +0200
commitc70575638912f04b846dd5848cc5843c9f56c4af (patch)
tree5c955241f4e665b8cef460ee026a00f627857287 /core/strings
parenta0f0e9e778db45ee027a279217e2d91d677f2001 (diff)
Fix doctest
Diffstat (limited to 'core/strings')
-rw-r--r--core/strings/strings.odin9
1 files changed, 4 insertions, 5 deletions
diff --git a/core/strings/strings.odin b/core/strings/strings.odin
index 59e70ed15..e45b177d7 100644
--- a/core/strings/strings.odin
+++ b/core/strings/strings.odin
@@ -527,15 +527,14 @@ Example:
fmt.println(strings.common_prefix("testing", "test"))
fmt.println(strings.common_prefix("testing", "te"))
fmt.println(strings.common_prefix("telephone", "te"))
- fmt.println(strings.common_prefix("testing", "est"))
}
Output:
- "test"
- "te"
- "te"
- ""
+ test
+ te
+ te
+
*/
common_prefix :: proc(a, b: string) -> string {