diff --git a/docs/modules.md b/docs/modules.md index 964eaa02f..86e041bcb 100644 --- a/docs/modules.md +++ b/docs/modules.md @@ -11,6 +11,7 @@ Bookshelf is designed with modularity in mind. Features that serve a common purp ## 🌟 Featured Modules ```{include} _templates/featured-modules.md + ``` ```{toctree} @@ -34,6 +35,7 @@ modules/random modules/raycast modules/schedule modules/sidebar +modules/string modules/time modules/tree modules/vector diff --git a/docs/modules/string.md b/docs/modules/string.md new file mode 100644 index 000000000..49510bb6a --- /dev/null +++ b/docs/modules/string.md @@ -0,0 +1,351 @@ +# 🔠 String + +**`#bs.string:help`** + +Manage strings (text), allowing easy transformation and searching within the text + +--- + +## 🔧 Functions + +You can find below all functions available in this module. + +--- + +### Concat + +```{function} #bs.string:concat + +Merge a list of strings together into one string + +:Inputs: + **Storage `bs:in string.concat.list`**: {nbt}`string` The list of strings that will be merge. + +:Outputs: + **Storage `bs:out string.concat`**: {nbt}`string` The merge string. +``` + +_Merge `Hello` and `World`:_ + +```mcfunction +data modify storage bs:in string.concat.list set value ["Hello ","World"] + +function #bs.string:concat + +tellraw @a [{"text":"The merge string is \""},{"storage":"bs:out","nbt":"string.concat"},{"text":"\""}] +``` + +> **Credits**: Aure31 + +--- + +### Uppercase / Lowercase + +:::::{tab-set} +::::{tab-item} Upper + +```{function} #bs.string:upper + +Converts the text to uppercase + +:Inputs: + **Storage `bs:in string.upper.str`**: {nbt}`string` The string to convert to uppercase + +:Outputs: + **Strorage `bs:out string.upper`**: {nbt}`string` The uppercase string +``` + +_put `hello world` to uppercase:_ + +```mcfunction +data modify storage bs:in string.upper.str set value "hello world" + +function #bs.string:upper + +tellraw @a [{"text":"The uppercase string is \""},{"storage":"bs:out","nbt":"string.upper"},{"text":"\""}] +``` + +:::: +::::{tab-item} Lower + +```{function} #bs.string:lower + +Converts the text to lowercase + +:Inputs: + **Storage `bs:in string.lower.str`**: {nbt}`string` The string to convert to lowercase + +:Outputs: + **Strorage `bs:out string.lower`**: {nbt}`string` The lowercase string +``` + +_put `hello world` to lowercase:_ + +```mcfunction +data modify storage bs:in string.lower.str set value "hello world" + +function #bs.string:lower + +tellraw @a [{"text":"The lowercase string is \""},{"storage":"bs:out","nbt":"string.upper"},{"text":"\""}] +``` + +:::: +::::: + +> **Credits**: Aure31 + +--- + +### Replace + +```{function} #bs.string:replace + +Replace a string by another + +:Inputs: + **Storage `bs:in string.replace.str`**: {nbt}`string` The string to replace + + **Storage `bs:in string.replace.old`**: {nbt}`string` The string to replace + + **Storage `bs:in string.replace.new`**: {nbt}`string` The string to replace by + +:Outputs: + **Strorage `bs:out string.replace`**: {nbt}`string` The replaced string +``` + +_replace world by minecraft:_ + +```mcfunction +data modify storage bs:in string.replace.str set value "hello world" +data modify storage bs:in string.replace.old set value "world" +data modify storage bs:in string.replace.new set value "minecraft" + +function #bs.string:replace {type:'fast'} + +tellraw @a [{"text":"The new string is \""},{"storage":"bs:out","nbt":"string.replace"},{"text":"\""}] +``` + +> **Credits**: Aure31 + +--- + +### Find + +```{function} #bs.string:find {occurrence:} + +Find a string in another string + +:Inputs: + **Storage `bs:in string.find.str`**: {nbt}`string` The string to find + + **Storage `bs:in string.find.needle`**: {nbt}`string` The string to find + + **Function macro**: + :::{treeview} + - {nbt}`compound` Arguments + - {nbt}`int` **occurrence**: The number of occurrence to find (if 0, find all) + ::: + +:Outputs: + **Strorage `bs:out string.find`**: {nbt}`list` The list of index where the string is found +``` + +_find `world` in `hello world`:_ + +```mcfunction +data modify storage bs:in string.find.str set value "hello world" +data modify storage bs:in string.find.needle set value "world" + +function #bs.string:find {occurrence:0} + +tellraw @a [{"text":"The string is found at index \""},{"storage":"bs:out","nbt":"string.find"},{"text":"\""}] +``` + +> **Credits**: Aure31 + +--- + +### Insert + +```{function} #bs.string:insert {index:} + +Insert a string in another string + +:Inputs: + **Storage `bs:in string.insert.str`**: {nbt}`string` The string to insert in + + **Storage `bs:in string.insert.needle`**: {nbt}`string` The string to insert + + **Function macro**: + :::{treeview} + - {nbt}`compound` Arguments + - {nbt}`int` **index**: The index where to insert the string + ::: + +:Outputs: + **Strorage `bs:out string.insert`**: {nbt}`string` The new string +``` + +_insert `beautiful` in `hello world`:_ + +```mcfunction +data modify storage bs:in string.insert.str set value "hello world" +data modify storage bs:in string.insert.needle set value "beautiful" + +function #bs.string:insert {index:6} + +tellraw @a [{"text":"The new string is \""},{"storage":"bs:out","nbt":"string.insert"},{"text":"\""}] +``` + +> **Credits**: Aure31 + +--- + +### Split + +```{function} #bs.string:split {maxsplit:} + +Split a string into a list of strings + +:Inputs: + **Storage `bs:in string.split.str`**: {nbt}`string` The string to split + + **Storage `bs:in string.split.separator`**: {nbt}`string` The separator to split the string + + **Function macro**: + :::{treeview} + - {nbt}`compound` Arguments + - {nbt}`int` **maxsplit**: The maximum number of split to do (if 0, split all) + ::: + +:Outputs: + **Strorage `bs:out string.split`**: {nbt}`list` The list of strings +``` + +_split `hello world` by `" "`:_ + +```mcfunction +data modify storage bs:in string.split.str set value "hello world" +data modify storage bs:in string.split.separator set value " " + +function #bs.string:split {maxsplit:0} + +tellraw @a [{"text":"The list of strings is \""},{"storage":"bs:out","nbt":"string.split"},{"text":"\""}] +``` + +> **Credits**: Aure31 + +--- + +### Transform Type + +:::::{tab-set} +::::{tab-item} To List + +```{function} #bs.string:to_list + +Transform a string into a list of characters + +:Inputs: + **Storage `bs:in string.to_list.str`**: {nbt}`string` The string to transform + +:Outputs: + **Strorage `bs:out string.to_list`**: {nbt}`list` The list of characters +``` + +_transform `hello world` into a list:_ + +```mcfunction +data modify storage bs:in string.to_list.str set value "hello world" + +function #bs.string:to_list + +tellraw @a [{"text":"The list of characters is \""},{"storage":"bs:out","nbt":"string.to_list"},{"text":"\""}] +``` + +:::: +::::{tab-item} To String + +```{function} #bs.string:to_string + +Transform a number into a string + +:Inputs: + **Macro**: + :::{treeview} + - {nbt}`compound` Arguments + - {nbt}`int` **number**: The number to transform + ::: + +:Outputs: + **Strorage `bs:out string.to_string`**: {nbt}`string` The string +``` + +_transform `42` into a string:_ + +```mcfunction +function #bs.string:to_string {number:42} + +tellraw @a [{"text":"The string is \""},{"storage":"bs:out","nbt":"string.to_string"},{"text":"\""}] +``` + +:::: +::::{tab-item} To Number + +```{function} #bs.string:to_number + +Transform a string into a number + +:Inputs: + **Macro**: + :::{treeview} + - {nbt}`compound` Arguments + - {nbt}`string` **str**: The string to transform + ::: + +:Outputs: + **Strorage `bs:out string.to_number`**: {nbt}`int` The number +``` + +_transform `42` into a number:_ + +```mcfunction +function #bs.string:to_number {str:"42"} + +tellraw @a [{"text":"The number is \""},{"storage":"bs:out","nbt":"string.to_number"},{"text":"\""}] +``` + +:::: + +::::: + +> **Credits**: Aure31 + +--- + +### Reverse + +```{function} #bs.string:reverse + +Reverse a string + +:Inputs: + **Storage `bs:in string.reverse.str`**: {nbt}`string` The string to reverse + +:Outputs: + **Strorage `bs:out string.reverse`**: {nbt}`string` The reversed string +``` + +_reverse `hello world`:_ + +```mcfunction +data modify storage bs:in string.reverse.str set value "hello world" + +function #bs.string:reverse + +tellraw @a [{"text":"The reversed string is \""},{"storage":"bs:out","nbt":"string.reverse"},{"text":"\""}] +``` + +> **Credits**: Aure31 + +--- diff --git a/meta/manifest.json b/meta/manifest.json index 0e94321b9..7d2ec2970 100644 --- a/meta/manifest.json +++ b/meta/manifest.json @@ -3364,6 +3364,188 @@ } ] }, + { + "id": "bs.string", + "name": "String", + "slug": "bookshelf-string", + "readme": "https://raw.githubusercontent.com/mcbookshelf/Bookshelf/refs/heads/master/modules/bs.string/README.md", + "description": "Get information about the system string effortlessly.", + "documentation": "https://docs.mcbookshelf.dev/en/latest/modules/string.html", + "kind": "data_pack", + "tags": [ + "default" + ], + "weak_dependencies": [ + "bs.log" + ], + "features": [ + { + "id": "#bs.string:concat", + "documentation": "https://docs.mcbookshelf.dev/en/latest/modules/string.html#concat", + "authors": [ + "aure31" + ], + "created": { + "date": "2025/01/10", + "minecraft_version": "1.21.4" + }, + "updated": { + "date": "2025/01/13", + "minecraft_version": "1.21.4" + } + }, + { + "id": "#bs.string:find", + "documentation": "https://docs.mcbookshelf.dev/en/latest/modules/string.html#find", + "authors": [ + "aure31" + ], + "created": { + "date": "2025/01/12", + "minecraft_version": "1.21.4" + }, + "updated": { + "date": "2025/01/15", + "minecraft_version": "1.21.4" + } + }, + { + "id": "#bs.string:index_of", + "documentation": "https://docs.mcbookshelf.dev/en/latest/modules/string.html#index-of", + "authors": [ + "aure31" + ], + "created": { + "date": "2024/10/27", + "minecraft_version": "1.21.3" + }, + "updated": { + "date": "2025/01/13", + "minecraft_version": "1.21.4" + } + }, + { + "id": "#bs.string:insert", + "documentation": "https://docs.mcbookshelf.dev/en/latest/modules/string.html#find", + "authors": [ + "aure31" + ], + "created": { + "date": "2025/01/25", + "minecraft_version": "1.21.4" + }, + "updated": { + "date": "2025/01/25", + "minecraft_version": "1.21.4" + } + }, + { + "id": "#bs.string:lower", + "documentation": "https://docs.mcbookshelf.dev/en/latest/modules/string.html#case", + "authors": [ + "aure31" + ], + "created": { + "date": "2025/01/11", + "minecraft_version": "1.21.4" + }, + "updated": { + "date": "2025/01/13", + "minecraft_version": "1.21.4" + } + }, + { + "id": "#bs.string:replace", + "documentation": "https://docs.mcbookshelf.dev/en/latest/modules/string.html#replace", + "authors": [ + "aure31" + ], + "created": { + "date": "2025/01/15", + "minecraft_version": "1.21.4" + }, + "updated": { + "date": "2025/01/15", + "minecraft_version": "1.21.4" + } + }, + { + "id": "#bs.string:split", + "documentation": "https://docs.mcbookshelf.dev/en/latest/modules/string.html#split", + "authors": [ + "aure31" + ], + "created": { + "date": "2025/01/15", + "minecraft_version": "1.21.4" + }, + "updated": { + "date": "2025/01/15", + "minecraft_version": "1.21.4" + } + }, + { + "id": "#bs.string:to_list", + "documentation": "https://docs.mcbookshelf.dev/en/latest/modules/string.html#to_list", + "authors": [ + "aure31" + ], + "created": { + "date": "2025/01/15", + "minecraft_version": "1.21.4" + }, + "updated": { + "date": "2025/01/15", + "minecraft_version": "1.21.4" + } + }, + { + "id": "#bs.string:to_number", + "documentation": "https://docs.mcbookshelf.dev/en/latest/modules/string.html#to_number", + "authors": [ + "aure31" + ], + "created": { + "date": "2025/01/11", + "minecraft_version": "1.21.4" + }, + "updated": { + "date": "2025/01/15", + "minecraft_version": "1.21.4" + } + }, + { + "id": "#bs.string:to_string", + "documentation": "https://docs.mcbookshelf.dev/en/latest/modules/string.html#to_string", + "authors": [ + "aure31" + ], + "created": { + "date": "2025/01/11", + "minecraft_version": "1.21.4" + }, + "updated": { + "date": "2025/01/15", + "minecraft_version": "1.21.4" + } + }, + { + "id": "#bs.string:upper", + "documentation": "https://docs.mcbookshelf.dev/en/latest/modules/string.html#case", + "authors": [ + "aure31" + ], + "created": { + "date": "2025/01/11", + "minecraft_version": "1.21.4" + }, + "updated": { + "date": "2025/01/13", + "minecraft_version": "1.21.4" + } + } + ] + }, { "id": "bs.time", "name": "Time", diff --git a/modules/bs.string/README.md b/modules/bs.string/README.md new file mode 100644 index 000000000..5bbf9bacd --- /dev/null +++ b/modules/bs.string/README.md @@ -0,0 +1,9 @@ +# 🔠 Bookshelf String + +This module allows you to easily manage string in Minecraft. + +For more details and usage examples, check out the Bookshelf [documentation](https://docs.mcbookshelf.dev/en/latest/modules/string.html). + +## 📖 About Bookshelf + +This module is part of the [Bookshelf Project](https://docs.mcbookshelf.dev/en/latest/index.html), a modular library datapack designed to simplify complex systems in Minecraft. Explore the full range of modules and discover how Bookshelf can simplify your Minecraft creations! diff --git a/modules/bs.string/data/bs.string/function/__load__.mcfunction b/modules/bs.string/data/bs.string/function/__load__.mcfunction new file mode 100644 index 000000000..14df7cdb0 --- /dev/null +++ b/modules/bs.string/data/bs.string/function/__load__.mcfunction @@ -0,0 +1,22 @@ +# ------------------------------------------------------------------------------------------------------------ +# Copyright (c) 2025 Gunivers +# +# This file is part of the Bookshelf project (https://github.com/mcbookshelf/Bookshelf). +# +# This source code is subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Conditions: +# - You may use this file in compliance with the MPL v2.0 +# - Any modifications must be documented and disclosed under the same license +# +# For more details, refer to the MPL v2.0. +# ------------------------------------------------------------------------------------------------------------ + +scoreboard objectives add bs.data dummy [{"text":"BS ","color":"dark_gray"},{"text":"Data","color":"aqua"}] +scoreboard objectives add bs.out dummy [{"text":"BS ","color":"dark_gray"},{"text":"Output","color":"aqua"}] +scoreboard objectives add bs.ctx dummy [{"text":"BS ","color":"dark_gray"},{"text":"Ctx","color":"aqua"}] +scoreboard objectives add bs.const dummy [{"text":"BS ","color":"dark_gray"},{"text":"Const","color":"aqua"}] + +#set constant +scoreboard players set 8 bs.const 8 diff --git a/modules/bs.string/data/bs.string/function/__unload__.mcfunction b/modules/bs.string/data/bs.string/function/__unload__.mcfunction new file mode 100644 index 000000000..dad753c0a --- /dev/null +++ b/modules/bs.string/data/bs.string/function/__unload__.mcfunction @@ -0,0 +1,21 @@ +# ------------------------------------------------------------------------------------------------------------ +# Copyright (c) 2025 Gunivers +# +# This file is part of the Bookshelf project (https://github.com/mcbookshelf/Bookshelf). +# +# This source code is subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Conditions: +# - You may use this file in compliance with the MPL v2.0 +# - Any modifications must be documented and disclosed under the same license +# +# For more details, refer to the MPL v2.0. +# ------------------------------------------------------------------------------------------------------------ + +scoreboard objectives remove bs.data +scoreboard objectives remove bs.out +scoreboard objectives remove bs.ctx + +#data remove storage bs:in string +data remove storage bs:data string diff --git a/modules/bs.string/data/bs.string/function/concat/binary.mcfunction b/modules/bs.string/data/bs.string/function/concat/binary.mcfunction new file mode 100644 index 000000000..586af046f --- /dev/null +++ b/modules/bs.string/data/bs.string/function/concat/binary.mcfunction @@ -0,0 +1,21 @@ +# ------------------------------------------------------------------------------------------------------------ +# Copyright (c) 2025 Gunivers +# +# This file is part of the Bookshelf project (https://github.com/mcbookshelf/Bookshelf). +# +# This source code is subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Conditions: +# - You may use this file in compliance with the MPL v2.0 +# - Any modifications must be documented and disclosed under the same license +# +# For more details, refer to the MPL v2.0. +# ------------------------------------------------------------------------------------------------------------ + +execute if score #n bs.ctx matches 2048.. run function bs.string:concat/combine/2048 +execute if score #n bs.ctx matches 1024.. run function bs.string:concat/combine/1024 +execute if score #n bs.ctx matches 512.. run function bs.string:concat/combine/512 +execute if score #n bs.ctx matches 256.. run function bs.string:concat/combine/256 +execute if score #n bs.ctx matches 128.. run function bs.string:concat/combine/128 +execute if score #n bs.ctx matches 64.. run function bs.string:concat/combine/64 diff --git a/modules/bs.string/data/bs.string/function/concat/concat.mcfunction b/modules/bs.string/data/bs.string/function/concat/concat.mcfunction new file mode 100644 index 000000000..5aa81ceb9 --- /dev/null +++ b/modules/bs.string/data/bs.string/function/concat/concat.mcfunction @@ -0,0 +1,22 @@ +# ------------------------------------------------------------------------------------------------------------ +# Copyright (c) 2025 Gunivers +# +# This file is part of the Bookshelf project (https://github.com/mcbookshelf/Bookshelf). +# +# This source code is subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Conditions: +# - You may use this file in compliance with the MPL v2.0 +# - Any modifications must be documented and disclosed under the same license +# +# For more details, refer to the MPL v2.0. +# ------------------------------------------------------------------------------------------------------------ + +# Modified from https://github.com/CMDred/StringLib/ + +data modify storage bs:ctx _ set from storage bs:in string.concat + +function bs.string:concat/run + +data modify storage bs:out string.concat set from storage bs:ctx _.s.1 diff --git a/modules/bs.string/data/bs.string/function/concat/dipatch.mcfunction b/modules/bs.string/data/bs.string/function/concat/dipatch.mcfunction new file mode 100644 index 000000000..fc974f833 --- /dev/null +++ b/modules/bs.string/data/bs.string/function/concat/dipatch.mcfunction @@ -0,0 +1,16 @@ +# ------------------------------------------------------------------------------------------------------------ +# Copyright (c) 2025 Gunivers +# +# This file is part of the Bookshelf project (https://github.com/mcbookshelf/Bookshelf). +# +# This source code is subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Conditions: +# - You may use this file in compliance with the MPL v2.0 +# - Any modifications must be documented and disclosed under the same license +# +# For more details, refer to the MPL v2.0. +# ------------------------------------------------------------------------------------------------------------ + +$function bs.string:concat/dispatch/$(y) with storage bs:ctx diff --git a/modules/bs.string/data/bs.string/function/concat/dispatch/0.mcfunction b/modules/bs.string/data/bs.string/function/concat/dispatch/0.mcfunction new file mode 100644 index 000000000..27a5afc12 --- /dev/null +++ b/modules/bs.string/data/bs.string/function/concat/dispatch/0.mcfunction @@ -0,0 +1,15 @@ +# ------------------------------------------------------------------------------------------------------------ +# Copyright (c) 2025 Gunivers +# +# This file is part of the Bookshelf project (https://github.com/mcbookshelf/Bookshelf). +# +# This source code is subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Conditions: +# - You may use this file in compliance with the MPL v2.0 +# - Any modifications must be documented and disclosed under the same license +# +# For more details, refer to the MPL v2.0. +# ------------------------------------------------------------------------------------------------------------ +$function bs.string:concat/combine/$(x) diff --git a/modules/bs.string/data/bs.string/function/concat/dispatch/1.mcfunction b/modules/bs.string/data/bs.string/function/concat/dispatch/1.mcfunction new file mode 100644 index 000000000..27a5afc12 --- /dev/null +++ b/modules/bs.string/data/bs.string/function/concat/dispatch/1.mcfunction @@ -0,0 +1,15 @@ +# ------------------------------------------------------------------------------------------------------------ +# Copyright (c) 2025 Gunivers +# +# This file is part of the Bookshelf project (https://github.com/mcbookshelf/Bookshelf). +# +# This source code is subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Conditions: +# - You may use this file in compliance with the MPL v2.0 +# - Any modifications must be documented and disclosed under the same license +# +# For more details, refer to the MPL v2.0. +# ------------------------------------------------------------------------------------------------------------ +$function bs.string:concat/combine/$(x) diff --git a/modules/bs.string/data/bs.string/function/concat/dispatch/2.mcfunction b/modules/bs.string/data/bs.string/function/concat/dispatch/2.mcfunction new file mode 100644 index 000000000..b2d4656a7 --- /dev/null +++ b/modules/bs.string/data/bs.string/function/concat/dispatch/2.mcfunction @@ -0,0 +1,16 @@ +# ------------------------------------------------------------------------------------------------------------ +# Copyright (c) 2025 Gunivers +# +# This file is part of the Bookshelf project (https://github.com/mcbookshelf/Bookshelf). +# +# This source code is subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Conditions: +# - You may use this file in compliance with the MPL v2.0 +# - Any modifications must be documented and disclosed under the same license +# +# For more details, refer to the MPL v2.0. +# ------------------------------------------------------------------------------------------------------------ + +$function bs.string:concat/combine/$(x) diff --git a/modules/bs.string/data/bs.string/function/concat/dispatch/3.mcfunction b/modules/bs.string/data/bs.string/function/concat/dispatch/3.mcfunction new file mode 100644 index 000000000..b2d4656a7 --- /dev/null +++ b/modules/bs.string/data/bs.string/function/concat/dispatch/3.mcfunction @@ -0,0 +1,16 @@ +# ------------------------------------------------------------------------------------------------------------ +# Copyright (c) 2025 Gunivers +# +# This file is part of the Bookshelf project (https://github.com/mcbookshelf/Bookshelf). +# +# This source code is subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Conditions: +# - You may use this file in compliance with the MPL v2.0 +# - Any modifications must be documented and disclosed under the same license +# +# For more details, refer to the MPL v2.0. +# ------------------------------------------------------------------------------------------------------------ + +$function bs.string:concat/combine/$(x) diff --git a/modules/bs.string/data/bs.string/function/concat/dispatch/4.mcfunction b/modules/bs.string/data/bs.string/function/concat/dispatch/4.mcfunction new file mode 100644 index 000000000..b2d4656a7 --- /dev/null +++ b/modules/bs.string/data/bs.string/function/concat/dispatch/4.mcfunction @@ -0,0 +1,16 @@ +# ------------------------------------------------------------------------------------------------------------ +# Copyright (c) 2025 Gunivers +# +# This file is part of the Bookshelf project (https://github.com/mcbookshelf/Bookshelf). +# +# This source code is subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Conditions: +# - You may use this file in compliance with the MPL v2.0 +# - Any modifications must be documented and disclosed under the same license +# +# For more details, refer to the MPL v2.0. +# ------------------------------------------------------------------------------------------------------------ + +$function bs.string:concat/combine/$(x) diff --git a/modules/bs.string/data/bs.string/function/concat/dispatch/5.mcfunction b/modules/bs.string/data/bs.string/function/concat/dispatch/5.mcfunction new file mode 100644 index 000000000..b2d4656a7 --- /dev/null +++ b/modules/bs.string/data/bs.string/function/concat/dispatch/5.mcfunction @@ -0,0 +1,16 @@ +# ------------------------------------------------------------------------------------------------------------ +# Copyright (c) 2025 Gunivers +# +# This file is part of the Bookshelf project (https://github.com/mcbookshelf/Bookshelf). +# +# This source code is subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Conditions: +# - You may use this file in compliance with the MPL v2.0 +# - Any modifications must be documented and disclosed under the same license +# +# For more details, refer to the MPL v2.0. +# ------------------------------------------------------------------------------------------------------------ + +$function bs.string:concat/combine/$(x) diff --git a/modules/bs.string/data/bs.string/function/concat/dispatch/6.mcfunction b/modules/bs.string/data/bs.string/function/concat/dispatch/6.mcfunction new file mode 100644 index 000000000..b2d4656a7 --- /dev/null +++ b/modules/bs.string/data/bs.string/function/concat/dispatch/6.mcfunction @@ -0,0 +1,16 @@ +# ------------------------------------------------------------------------------------------------------------ +# Copyright (c) 2025 Gunivers +# +# This file is part of the Bookshelf project (https://github.com/mcbookshelf/Bookshelf). +# +# This source code is subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Conditions: +# - You may use this file in compliance with the MPL v2.0 +# - Any modifications must be documented and disclosed under the same license +# +# For more details, refer to the MPL v2.0. +# ------------------------------------------------------------------------------------------------------------ + +$function bs.string:concat/combine/$(x) diff --git a/modules/bs.string/data/bs.string/function/concat/dispatch/7.mcfunction b/modules/bs.string/data/bs.string/function/concat/dispatch/7.mcfunction new file mode 100644 index 000000000..b2d4656a7 --- /dev/null +++ b/modules/bs.string/data/bs.string/function/concat/dispatch/7.mcfunction @@ -0,0 +1,16 @@ +# ------------------------------------------------------------------------------------------------------------ +# Copyright (c) 2025 Gunivers +# +# This file is part of the Bookshelf project (https://github.com/mcbookshelf/Bookshelf). +# +# This source code is subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Conditions: +# - You may use this file in compliance with the MPL v2.0 +# - Any modifications must be documented and disclosed under the same license +# +# For more details, refer to the MPL v2.0. +# ------------------------------------------------------------------------------------------------------------ + +$function bs.string:concat/combine/$(x) diff --git a/modules/bs.string/data/bs.string/function/concat/run.mcfunction b/modules/bs.string/data/bs.string/function/concat/run.mcfunction new file mode 100644 index 000000000..acb0d8530 --- /dev/null +++ b/modules/bs.string/data/bs.string/function/concat/run.mcfunction @@ -0,0 +1,30 @@ +# ------------------------------------------------------------------------------------------------------------ +# Copyright (c) 2025 Gunivers +# +# This file is part of the Bookshelf project (https://github.com/mcbookshelf/Bookshelf). +# +# This source code is subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Conditions: +# - You may use this file in compliance with the MPL v2.0 +# - Any modifications must be documented and disclosed under the same license +# +# For more details, refer to the MPL v2.0. +# ------------------------------------------------------------------------------------------------------------ + +# Modified from https://github.com/CMDred/StringLib/ + +data modify storage bs:ctx _.s.1 set from storage bs:ctx _.list[-1] +data remove storage bs:ctx _.list[-1] +execute store result storage bs:ctx x int 1 store result score #n bs.ctx if data storage bs:ctx _.list[] + +# we dont need below 64 since it's already handled in a single cycle +execute if score #n bs.ctx matches 64.. run function bs.string:concat/binary + +# if stuff remains +scoreboard players remove #c bs.ctx 1 +# Which dispatch to call +execute store result storage bs:ctx x int 1 store result score #c bs.ctx run scoreboard players get #n bs.ctx +execute store result storage bs:ctx y int 1 run scoreboard players operation #c bs.ctx /= 8 bs.const +execute if score #n bs.ctx matches 1.. run function bs.string:concat/dipatch with storage bs:ctx diff --git a/modules/bs.string/data/bs.string/function/find/count/count.mcfunction b/modules/bs.string/data/bs.string/function/find/count/count.mcfunction new file mode 100644 index 000000000..200723e50 --- /dev/null +++ b/modules/bs.string/data/bs.string/function/find/count/count.mcfunction @@ -0,0 +1,24 @@ +# ------------------------------------------------------------------------------------------------------------ +# Copyright (c) 2025 Gunivers +# +# This file is part of the Bookshelf project (https://github.com/mcbookshelf/Bookshelf). +# +# This source code is subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Conditions: +# - You may use this file in compliance with the MPL v2.0 +# - Any modifications must be documented and disclosed under the same license +# +# For more details, refer to the MPL v2.0. +# ------------------------------------------------------------------------------------------------------------ + +$data modify storage bs:ctx _.test set string storage bs:ctx _.str 0 $(y) +data modify storage bs:ctx _.ltr set string storage bs:ctx _.test -1 +execute store success score #t bs.ctx run data modify storage bs:ctx _.test set from storage bs:in string.find.needle + +data modify storage bs:ctx z set from storage bs:ctx y +function bs.string:find/match_patern with storage bs:ctx _ +execute if score #t bs.ctx matches 0 run return run function bs.string:find/count/up + +function bs.string:find/count/skip with storage bs:ctx diff --git a/modules/bs.string/data/bs.string/function/find/count/skip.mcfunction b/modules/bs.string/data/bs.string/function/find/count/skip.mcfunction new file mode 100644 index 000000000..61a3b205f --- /dev/null +++ b/modules/bs.string/data/bs.string/function/find/count/skip.mcfunction @@ -0,0 +1,22 @@ +# ------------------------------------------------------------------------------------------------------------ +# Copyright (c) 2025 Gunivers +# +# This file is part of the Bookshelf project (https://github.com/mcbookshelf/Bookshelf). +# +# This source code is subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Conditions: +# - You may use this file in compliance with the MPL v2.0 +# - Any modifications must be documented and disclosed under the same license +# +# For more details, refer to the MPL v2.0. +# ------------------------------------------------------------------------------------------------------------ + +$execute store result storage bs:ctx x int 1 run scoreboard players add #i bs.ctx $(z) + +execute if score #l bs.ctx < #i bs.ctx run return run data get storage bs:out string.find + +$data modify storage bs:ctx _.str set string storage bs:ctx _.str $(z) + +function bs.string:find/count/count with storage bs:ctx diff --git a/modules/bs.string/data/bs.string/function/find/count/up.mcfunction b/modules/bs.string/data/bs.string/function/find/count/up.mcfunction new file mode 100644 index 000000000..4c108e355 --- /dev/null +++ b/modules/bs.string/data/bs.string/function/find/count/up.mcfunction @@ -0,0 +1,21 @@ +# ------------------------------------------------------------------------------------------------------------ +# Copyright (c) 2025 Gunivers +# +# This file is part of the Bookshelf project (https://github.com/mcbookshelf/Bookshelf). +# +# This source code is subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Conditions: +# - You may use this file in compliance with the MPL v2.0 +# - Any modifications must be documented and disclosed under the same license +# +# For more details, refer to the MPL v2.0. +# ------------------------------------------------------------------------------------------------------------ + +data modify storage bs:out string.find append from storage bs:ctx x + +scoreboard players add #c bs.ctx 1 +execute if score #c bs.ctx = #o bs.ctx run return 0 + +function bs.string:find/count/skip with storage bs:ctx diff --git a/modules/bs.string/data/bs.string/function/find/find.mcfunction b/modules/bs.string/data/bs.string/function/find/find.mcfunction new file mode 100644 index 000000000..18b84d122 --- /dev/null +++ b/modules/bs.string/data/bs.string/function/find/find.mcfunction @@ -0,0 +1,39 @@ +# ------------------------------------------------------------------------------------------------------------ +# Copyright (c) 2025 Gunivers +# +# This file is part of the Bookshelf project (https://github.com/mcbookshelf/Bookshelf). +# +# This source code is subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Conditions: +# - You may use this file in compliance with the MPL v2.0 +# - Any modifications must be documented and disclosed under the same license +# +# For more details, refer to the MPL v2.0. +# ------------------------------------------------------------------------------------------------------------ + +$scoreboard players set #o bs.ctx $(occurrence) +data modify storage bs:out string.find set value [] +execute store result score #c bs.ctx store result storage bs:ctx x int 1 run scoreboard players set #i bs.ctx 0 +data modify storage bs:ctx _ set from storage bs:in string.find +execute store result score #l bs.ctx run data get storage bs:in string.find.str +execute store result score #p bs.ctx store result score #e bs.ctx store result storage bs:ctx y int 1 run data get storage bs:in string.find.needle + +#corner case +execute if score #l bs.ctx matches 0 run return 0 +execute if score #p bs.ctx matches 0 run return 0 + +execute if score #p bs.ctx > #l bs.ctx run return 0 +scoreboard players operation #l bs.ctx -= #p bs.ctx + + +#precompute +data modify storage bs:ctx _.ltr set string storage bs:ctx _.needle 0 1 +data modify storage bs:ctx _.needle set string storage bs:ctx _.needle 1 +data remove storage bs:ctx _.patern +function bs.string:find/precompute with storage bs:ctx _ + +execute if score #o bs.ctx matches 0 run return run function bs.string:find/normal/normal with storage bs:ctx +execute if score #o bs.ctx matches 1.. run return run function bs.string:find/count/count with storage bs:ctx +function #bs.log:error { namespace: "bs.string", path: "bs.string:find", tag: "find", message: '"does not accept negative values"' } diff --git a/modules/bs.string/data/bs.string/function/find/match_patern.mcfunction b/modules/bs.string/data/bs.string/function/find/match_patern.mcfunction new file mode 100644 index 000000000..d729c65f1 --- /dev/null +++ b/modules/bs.string/data/bs.string/function/find/match_patern.mcfunction @@ -0,0 +1,16 @@ +# ------------------------------------------------------------------------------------------------------------ +# Copyright (c) 2025 Gunivers +# +# This file is part of the Bookshelf project (https://github.com/mcbookshelf/Bookshelf). +# +# This source code is subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Conditions: +# - You may use this file in compliance with the MPL v2.0 +# - Any modifications must be documented and disclosed under the same license +# +# For more details, refer to the MPL v2.0. +# ------------------------------------------------------------------------------------------------------------ + +$data modify storage bs:ctx z set from storage bs:ctx _.patern."$(ltr)" diff --git a/modules/bs.string/data/bs.string/function/find/normal/normal.mcfunction b/modules/bs.string/data/bs.string/function/find/normal/normal.mcfunction new file mode 100644 index 000000000..0ec14f8d9 --- /dev/null +++ b/modules/bs.string/data/bs.string/function/find/normal/normal.mcfunction @@ -0,0 +1,26 @@ +# ------------------------------------------------------------------------------------------------------------ +# Copyright (c) 2025 Gunivers +# +# This file is part of the Bookshelf project (https://github.com/mcbookshelf/Bookshelf). +# +# This source code is subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Conditions: +# - You may use this file in compliance with the MPL v2.0 +# - Any modifications must be documented and disclosed under the same license +# +# For more details, refer to the MPL v2.0. +# ------------------------------------------------------------------------------------------------------------ + +$data modify storage bs:ctx _.test set string storage bs:ctx _.str 0 $(y) +data modify storage bs:ctx _.ltr set string storage bs:ctx _.test -1 +execute store success score #t bs.ctx run data modify storage bs:ctx _.test set from storage bs:in string.find.needle + +execute if score #t bs.ctx matches 0 run data modify storage bs:out string.find append from storage bs:ctx x + +data modify storage bs:ctx z set from storage bs:ctx y +function bs.string:find/match_patern with storage bs:ctx _ +execute if score #t bs.ctx matches 0 run return run function bs.string:find/normal/skip with storage bs:ctx + +function bs.string:find/normal/skip with storage bs:ctx diff --git a/modules/bs.string/data/bs.string/function/find/normal/skip.mcfunction b/modules/bs.string/data/bs.string/function/find/normal/skip.mcfunction new file mode 100644 index 000000000..3b1387690 --- /dev/null +++ b/modules/bs.string/data/bs.string/function/find/normal/skip.mcfunction @@ -0,0 +1,22 @@ +# ------------------------------------------------------------------------------------------------------------ +# Copyright (c) 2025 Gunivers +# +# This file is part of the Bookshelf project (https://github.com/mcbookshelf/Bookshelf). +# +# This source code is subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Conditions: +# - You may use this file in compliance with the MPL v2.0 +# - Any modifications must be documented and disclosed under the same license +# +# For more details, refer to the MPL v2.0. +# ------------------------------------------------------------------------------------------------------------ + +$execute store result storage bs:ctx x int 1 run scoreboard players add #i bs.ctx $(z) + +execute if score #l bs.ctx < #i bs.ctx run return run data get storage bs:out string.find + +$data modify storage bs:ctx _.str set string storage bs:ctx _.str $(z) + +function bs.string:find/normal/normal with storage bs:ctx diff --git a/modules/bs.string/data/bs.string/function/find/precompute.mcfunction b/modules/bs.string/data/bs.string/function/find/precompute.mcfunction new file mode 100644 index 000000000..960c9b057 --- /dev/null +++ b/modules/bs.string/data/bs.string/function/find/precompute.mcfunction @@ -0,0 +1,22 @@ +# ------------------------------------------------------------------------------------------------------------ +# Copyright (c) 2025 Gunivers +# +# This file is part of the Bookshelf project (https://github.com/mcbookshelf/Bookshelf). +# +# This source code is subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Conditions: +# - You may use this file in compliance with the MPL v2.0 +# - Any modifications must be documented and disclosed under the same license +# +# For more details, refer to the MPL v2.0. +# ------------------------------------------------------------------------------------------------------------ + +execute if score #e bs.ctx matches 1 run return 1 +execute store result storage bs:ctx z int 1 run scoreboard players remove #e bs.ctx 1 +$data modify storage bs:ctx _.patern."$(ltr)" set from storage bs:ctx z + +data modify storage bs:ctx _.ltr set string storage bs:ctx _.needle 0 1 +data modify storage bs:ctx _.needle set string storage bs:ctx _.needle 1 +function bs.string:find/precompute with storage bs:ctx _ diff --git a/modules/bs.string/data/bs.string/function/import/char_table.mcfunction b/modules/bs.string/data/bs.string/function/import/char_table.mcfunction new file mode 100644 index 000000000..3c63e6f69 --- /dev/null +++ b/modules/bs.string/data/bs.string/function/import/char_table.mcfunction @@ -0,0 +1,18 @@ +# ------------------------------------------------------------------------------------------------------------ +# Copyright (c) 2025 Gunivers +# +# This file is part of the Bookshelf project (https://github.com/mcbookshelf/Bookshelf). +# +# This source code is subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Conditions: +# - You may use this file in compliance with the MPL v2.0 +# - Any modifications must be documented and disclosed under the same license +# +# For more details, refer to the MPL v2.0. +# ------------------------------------------------------------------------------------------------------------ + +data modify storage bs:const string.lower set value {"A":"a","B":"b","C":"c","D":"d","E":"e","F":"f","G":"g","H":"h","I":"i","J":"j","K":"k","L":"l","M":"m","N":"n","O":"o","P":"p","Q":"q","R":"r","S":"s","T":"t","U":"u","V":"v","W":"w","X":"x","Y":"y","Z":"z","À":"à","Á":"á","Â":"â","Ã":"ã","Ä":"ä","Å":"å","Æ":"æ","Ç":"ç","È":"è","É":"é","Ê":"ê","Ë":"ë","Ì":"ì","Í":"í","Î":"î","Ï":"ï","Ð":"ð","Ñ":"ñ","Ò":"ò","Ó":"ó","Ô":"ô","Õ":"õ","Ö":"ö","Ø":"ø","Ù":"ù","Ú":"ú","Û":"û","Ü":"ü","Ý":"ý","Þ":"þ","Ā":"ā","Ă":"ă","Ą":"ą","Ć":"ć","Ĉ":"ĉ","Ċ":"ċ","Č":"č","Ď":"ď","Đ":"đ","Ē":"ē","Ĕ":"ĕ","Ė":"ė","Ę":"ę","Ě":"ě","Ĝ":"ĝ","Ğ":"ğ","Ġ":"ġ","Ģ":"ģ","Ĥ":"ĥ","Ħ":"ħ","Ĩ":"ĩ","Ī":"ī","Ĭ":"ĭ","Į":"į","İ":"i","IJ":"ij","Ĵ":"ĵ","Ķ":"ķ","Ĺ":"ĺ","Ļ":"ļ","Ľ":"ľ","Ŀ":"ŀ","Ł":"ł","Ń":"ń","Ņ":"ņ","Ň":"ň","Ŋ":"ŋ","Ō":"ō","Ŏ":"ŏ","Ő":"ő","Œ":"œ","Ŕ":"ŕ","Ŗ":"ŗ","Ř":"ř","Ś":"ś","Ŝ":"ŝ","Ş":"ş","Š":"š","Ţ":"ţ","Ť":"ť","Ŧ":"ŧ","Ũ":"ũ","Ū":"ū","Ŭ":"ŭ","Ů":"ů","Ű":"ű","Ų":"ų","Ŵ":"ŵ","Ŷ":"ŷ","Ÿ":"ÿ","Ź":"ź","Ż":"ż","Ž":"ž","Ɓ":"ɓ","Ƃ":"ƃ","Ƅ":"ƅ","Ɔ":"ɔ","Ƈ":"ƈ","Ɖ":"ɖ","Ɗ":"ɗ","Ƌ":"ƌ","Ǝ":"ǝ","Ə":"ə","Ɛ":"ɛ","Ƒ":"ƒ","Ɠ":"ɠ","Ɣ":"ɣ","Ɩ":"ɩ","Ɨ":"ɨ","Ƙ":"ƙ","Ɯ":"ɯ","Ɲ":"ɲ","Ɵ":"ɵ","Ơ":"ơ","Ƣ":"ƣ","Ƥ":"ƥ","Ʀ":"ʀ","Ƨ":"ƨ","Ʃ":"ʃ","Ƭ":"ƭ","Ʈ":"ʈ","Ư":"ư","Ʊ":"ʊ","Ʋ":"ʋ","Ƴ":"ƴ","Ƶ":"ƶ","Ʒ":"ʒ","Ƹ":"ƹ","Ƽ":"ƽ","DŽ":"dž","Dž":"dž","LJ":"lj","Lj":"lj","NJ":"nj","Nj":"nj","Ǎ":"ǎ","Ǐ":"ǐ","Ǒ":"ǒ","Ǔ":"ǔ","Ǖ":"ǖ","Ǘ":"ǘ","Ǚ":"ǚ","Ǜ":"ǜ","Ǟ":"ǟ","Ǡ":"ǡ","Ǣ":"ǣ","Ǥ":"ǥ","Ǧ":"ǧ","Ǩ":"ǩ","Ǫ":"ǫ","Ǭ":"ǭ","Ǯ":"ǯ","DZ":"dz","Dz":"dz","Ǵ":"ǵ","Ƕ":"ƕ","Ƿ":"ƿ","Ǹ":"ǹ","Ǻ":"ǻ","Ǽ":"ǽ","Ǿ":"ǿ","Ȁ":"ȁ","Ȃ":"ȃ","Ȅ":"ȅ","Ȇ":"ȇ","Ȉ":"ȉ","Ȋ":"ȋ","Ȍ":"ȍ","Ȏ":"ȏ","Ȑ":"ȑ","Ȓ":"ȓ","Ȕ":"ȕ","Ȗ":"ȗ","Ș":"ș","Ț":"ț","Ȝ":"ȝ","Ȟ":"ȟ","Ƞ":"ƞ","Ȣ":"ȣ","Ȥ":"ȥ","Ȧ":"ȧ","Ȩ":"ȩ","Ȫ":"ȫ","Ȭ":"ȭ","Ȯ":"ȯ","Ȱ":"ȱ","Ȳ":"ȳ","Ⱥ":"ⱥ","Ȼ":"ȼ","Ƚ":"ƚ","Ⱦ":"ⱦ","Ɂ":"ɂ","Ƀ":"ƀ","Ʉ":"ʉ","Ʌ":"ʌ","Ɇ":"ɇ","Ɉ":"ɉ","Ɋ":"ɋ","Ɍ":"ɍ","Ɏ":"ɏ","Ͱ":"ͱ","Ͳ":"ͳ","Ͷ":"ͷ","Ϳ":"ϳ","Ά":"ά","Έ":"έ","Ή":"ή","Ί":"ί","Ό":"ό","Ύ":"ύ","Ώ":"ώ","Α":"α","Β":"β","Γ":"γ","Δ":"δ","Ε":"ε","Ζ":"ζ","Η":"η","Θ":"θ","Ι":"ι","Κ":"κ","Λ":"λ","Μ":"μ","Ν":"ν","Ξ":"ξ","Ο":"ο","Π":"π","Ρ":"ρ","Σ":"σ","Τ":"τ","Υ":"υ","Φ":"φ","Χ":"χ","Ψ":"ψ","Ω":"ω","Ϊ":"ϊ","Ϋ":"ϋ","Ϗ":"ϗ","Ϙ":"ϙ","Ϛ":"ϛ","Ϝ":"ϝ","Ϟ":"ϟ","Ϡ":"ϡ","Ϣ":"ϣ","Ϥ":"ϥ","Ϧ":"ϧ","Ϩ":"ϩ","Ϫ":"ϫ","Ϭ":"ϭ","Ϯ":"ϯ","ϴ":"θ","Ϸ":"ϸ","Ϲ":"ϲ","Ϻ":"ϻ","Ͻ":"ͻ","Ͼ":"ͼ","Ͽ":"ͽ","Ѐ":"ѐ","Ё":"ё","Ђ":"ђ","Ѓ":"ѓ","Є":"є","Ѕ":"ѕ","І":"і","Ї":"ї","Ј":"ј","Љ":"љ","Њ":"њ","Ћ":"ћ","Ќ":"ќ","Ѝ":"ѝ","Ў":"ў","Џ":"џ","А":"а","Б":"б","В":"в","Г":"г","Д":"д","Е":"е","Ж":"ж","З":"з","И":"и","Й":"й","К":"к","Л":"л","М":"м","Н":"н","О":"о","П":"п","Р":"р","С":"с","Т":"т","У":"у","Ф":"ф","Х":"х","Ц":"ц","Ч":"ч","Ш":"ш","Щ":"щ","Ъ":"ъ","Ы":"ы","Ь":"ь","Э":"э","Ю":"ю","Я":"я","Ѡ":"ѡ","Ѣ":"ѣ","Ѥ":"ѥ","Ѧ":"ѧ","Ѩ":"ѩ","Ѫ":"ѫ","Ѭ":"ѭ","Ѯ":"ѯ","Ѱ":"ѱ","Ѳ":"ѳ","Ѵ":"ѵ","Ѷ":"ѷ","Ѹ":"ѹ","Ѻ":"ѻ","Ѽ":"ѽ","Ѿ":"ѿ","Ҁ":"ҁ","Ҋ":"ҋ","Ҍ":"ҍ","Ҏ":"ҏ","Ґ":"ґ","Ғ":"ғ","Ҕ":"ҕ","Җ":"җ","Ҙ":"ҙ","Қ":"қ","Ҝ":"ҝ","Ҟ":"ҟ","Ҡ":"ҡ","Ң":"ң","Ҥ":"ҥ","Ҧ":"ҧ","Ҩ":"ҩ","Ҫ":"ҫ","Ҭ":"ҭ","Ү":"ү","Ұ":"ұ","Ҳ":"ҳ","Ҵ":"ҵ","Ҷ":"ҷ","Ҹ":"ҹ","Һ":"һ","Ҽ":"ҽ","Ҿ":"ҿ","Ӏ":"ӏ","Ӂ":"ӂ","Ӄ":"ӄ","Ӆ":"ӆ","Ӈ":"ӈ","Ӊ":"ӊ","Ӌ":"ӌ","Ӎ":"ӎ","Ӑ":"ӑ","Ӓ":"ӓ","Ӕ":"ӕ","Ӗ":"ӗ","Ә":"ә","Ӛ":"ӛ","Ӝ":"ӝ","Ӟ":"ӟ","Ӡ":"ӡ","Ӣ":"ӣ","Ӥ":"ӥ","Ӧ":"ӧ","Ө":"ө","Ӫ":"ӫ","Ӭ":"ӭ","Ӯ":"ӯ","Ӱ":"ӱ","Ӳ":"ӳ","Ӵ":"ӵ","Ӷ":"ӷ","Ӹ":"ӹ","Ӻ":"ӻ","Ӽ":"ӽ","Ӿ":"ӿ","Ԁ":"ԁ","Ԃ":"ԃ","Ԅ":"ԅ","Ԇ":"ԇ","Ԉ":"ԉ","Ԋ":"ԋ","Ԍ":"ԍ","Ԏ":"ԏ","Ԑ":"ԑ","Ԓ":"ԓ","Ԕ":"ԕ","Ԗ":"ԗ","Ԙ":"ԙ","Ԛ":"ԛ","Ԝ":"ԝ","Ԟ":"ԟ","Ԡ":"ԡ","Ԣ":"ԣ","Ԥ":"ԥ","Ԧ":"ԧ","Ԩ":"ԩ","Ԫ":"ԫ","Ԭ":"ԭ","Ԯ":"ԯ","Ա":"ա","Բ":"բ","Գ":"գ","Դ":"դ","Ե":"ե","Զ":"զ","Է":"է","Ը":"ը","Թ":"թ","Ժ":"ժ","Ի":"ի","Լ":"լ","Խ":"խ","Ծ":"ծ","Կ":"կ","Հ":"հ","Ձ":"ձ","Ղ":"ղ","Ճ":"ճ","Մ":"մ","Յ":"յ","Ն":"ն","Շ":"շ","Ո":"ո","Չ":"չ","Պ":"պ","Ջ":"ջ","Ռ":"ռ","Ս":"ս","Վ":"վ","Տ":"տ","Ր":"ր","Ց":"ց","Ւ":"ւ","Փ":"փ","Ք":"ք","Օ":"օ","Ֆ":"ֆ","Ⴀ":"ⴀ","Ⴁ":"ⴁ","Ⴂ":"ⴂ","Ⴃ":"ⴃ","Ⴄ":"ⴄ","Ⴅ":"ⴅ","Ⴆ":"ⴆ","Ⴇ":"ⴇ","Ⴈ":"ⴈ","Ⴉ":"ⴉ","Ⴊ":"ⴊ","Ⴋ":"ⴋ","Ⴌ":"ⴌ","Ⴍ":"ⴍ","Ⴎ":"ⴎ","Ⴏ":"ⴏ","Ⴐ":"ⴐ","Ⴑ":"ⴑ","Ⴒ":"ⴒ","Ⴓ":"ⴓ","Ⴔ":"ⴔ","Ⴕ":"ⴕ","Ⴖ":"ⴖ","Ⴗ":"ⴗ","Ⴘ":"ⴘ","Ⴙ":"ⴙ","Ⴚ":"ⴚ","Ⴛ":"ⴛ","Ⴜ":"ⴜ","Ⴝ":"ⴝ","Ⴞ":"ⴞ","Ⴟ":"ⴟ","Ⴠ":"ⴠ","Ⴡ":"ⴡ","Ⴢ":"ⴢ","Ⴣ":"ⴣ","Ⴤ":"ⴤ","Ⴥ":"ⴥ","Ⴧ":"ⴧ","Ⴭ":"ⴭ","Ꭰ":"ꭰ","Ꭱ":"ꭱ","Ꭲ":"ꭲ","Ꭳ":"ꭳ","Ꭴ":"ꭴ","Ꭵ":"ꭵ","Ꭶ":"ꭶ","Ꭷ":"ꭷ","Ꭸ":"ꭸ","Ꭹ":"ꭹ","Ꭺ":"ꭺ","Ꭻ":"ꭻ","Ꭼ":"ꭼ","Ꭽ":"ꭽ","Ꭾ":"ꭾ","Ꭿ":"ꭿ","Ꮀ":"ꮀ","Ꮁ":"ꮁ","Ꮂ":"ꮂ","Ꮃ":"ꮃ","Ꮄ":"ꮄ","Ꮅ":"ꮅ","Ꮆ":"ꮆ","Ꮇ":"ꮇ","Ꮈ":"ꮈ","Ꮉ":"ꮉ","Ꮊ":"ꮊ","Ꮋ":"ꮋ","Ꮌ":"ꮌ","Ꮍ":"ꮍ","Ꮎ":"ꮎ","Ꮏ":"ꮏ","Ꮐ":"ꮐ","Ꮑ":"ꮑ","Ꮒ":"ꮒ","Ꮓ":"ꮓ","Ꮔ":"ꮔ","Ꮕ":"ꮕ","Ꮖ":"ꮖ","Ꮗ":"ꮗ","Ꮘ":"ꮘ","Ꮙ":"ꮙ","Ꮚ":"ꮚ","Ꮛ":"ꮛ","Ꮜ":"ꮜ","Ꮝ":"ꮝ","Ꮞ":"ꮞ","Ꮟ":"ꮟ","Ꮠ":"ꮠ","Ꮡ":"ꮡ","Ꮢ":"ꮢ","Ꮣ":"ꮣ","Ꮤ":"ꮤ","Ꮥ":"ꮥ","Ꮦ":"ꮦ","Ꮧ":"ꮧ","Ꮨ":"ꮨ","Ꮩ":"ꮩ","Ꮪ":"ꮪ","Ꮫ":"ꮫ","Ꮬ":"ꮬ","Ꮭ":"ꮭ","Ꮮ":"ꮮ","Ꮯ":"ꮯ","Ꮰ":"ꮰ","Ꮱ":"ꮱ","Ꮲ":"ꮲ","Ꮳ":"ꮳ","Ꮴ":"ꮴ","Ꮵ":"ꮵ","Ꮶ":"ꮶ","Ꮷ":"ꮷ","Ꮸ":"ꮸ","Ꮹ":"ꮹ","Ꮺ":"ꮺ","Ꮻ":"ꮻ","Ꮼ":"ꮼ","Ꮽ":"ꮽ","Ꮾ":"ꮾ","Ꮿ":"ꮿ","Ᏸ":"ᏸ","Ᏹ":"ᏹ","Ᏺ":"ᏺ","Ᏻ":"ᏻ","Ᏼ":"ᏼ","Ᏽ":"ᏽ","Ᲊ":"ᲊ","Ა":"ა","Ბ":"ბ","Გ":"გ","Დ":"დ","Ე":"ე","Ვ":"ვ","Ზ":"ზ","Თ":"თ","Ი":"ი","Კ":"კ","Ლ":"ლ","Მ":"მ","Ნ":"ნ","Ო":"ო","Პ":"პ","Ჟ":"ჟ","Რ":"რ","Ს":"ს","Ტ":"ტ","Უ":"უ","Ფ":"ფ","Ქ":"ქ","Ღ":"ღ","Ყ":"ყ","Შ":"შ","Ჩ":"ჩ","Ც":"ც","Ძ":"ძ","Წ":"წ","Ჭ":"ჭ","Ხ":"ხ","Ჯ":"ჯ","Ჰ":"ჰ","Ჱ":"ჱ","Ჲ":"ჲ","Ჳ":"ჳ","Ჴ":"ჴ","Ჵ":"ჵ","Ჶ":"ჶ","Ჷ":"ჷ","Ჸ":"ჸ","Ჹ":"ჹ","Ჺ":"ჺ","Ჽ":"ჽ","Ჾ":"ჾ","Ჿ":"ჿ","Ḁ":"ḁ","Ḃ":"ḃ","Ḅ":"ḅ","Ḇ":"ḇ","Ḉ":"ḉ","Ḋ":"ḋ","Ḍ":"ḍ","Ḏ":"ḏ","Ḑ":"ḑ","Ḓ":"ḓ","Ḕ":"ḕ","Ḗ":"ḗ","Ḙ":"ḙ","Ḛ":"ḛ","Ḝ":"ḝ","Ḟ":"ḟ","Ḡ":"ḡ","Ḣ":"ḣ","Ḥ":"ḥ","Ḧ":"ḧ","Ḩ":"ḩ","Ḫ":"ḫ","Ḭ":"ḭ","Ḯ":"ḯ","Ḱ":"ḱ","Ḳ":"ḳ","Ḵ":"ḵ","Ḷ":"ḷ","Ḹ":"ḹ","Ḻ":"ḻ","Ḽ":"ḽ","Ḿ":"ḿ","Ṁ":"ṁ","Ṃ":"ṃ","Ṅ":"ṅ","Ṇ":"ṇ","Ṉ":"ṉ","Ṋ":"ṋ","Ṍ":"ṍ","Ṏ":"ṏ","Ṑ":"ṑ","Ṓ":"ṓ","Ṕ":"ṕ","Ṗ":"ṗ","Ṙ":"ṙ","Ṛ":"ṛ","Ṝ":"ṝ","Ṟ":"ṟ","Ṡ":"ṡ","Ṣ":"ṣ","Ṥ":"ṥ","Ṧ":"ṧ","Ṩ":"ṩ","Ṫ":"ṫ","Ṭ":"ṭ","Ṯ":"ṯ","Ṱ":"ṱ","Ṳ":"ṳ","Ṵ":"ṵ","Ṷ":"ṷ","Ṹ":"ṹ","Ṻ":"ṻ","Ṽ":"ṽ","Ṿ":"ṿ","Ẁ":"ẁ","Ẃ":"ẃ","Ẅ":"ẅ","Ẇ":"ẇ","Ẉ":"ẉ","Ẋ":"ẋ","Ẍ":"ẍ","Ẏ":"ẏ","Ẑ":"ẑ","Ẓ":"ẓ","Ẕ":"ẕ","ẞ":"ß","Ạ":"ạ","Ả":"ả","Ấ":"ấ","Ầ":"ầ","Ẩ":"ẩ","Ẫ":"ẫ","Ậ":"ậ","Ắ":"ắ","Ằ":"ằ","Ẳ":"ẳ","Ẵ":"ẵ","Ặ":"ặ","Ẹ":"ẹ","Ẻ":"ẻ","Ẽ":"ẽ","Ế":"ế","Ề":"ề","Ể":"ể","Ễ":"ễ","Ệ":"ệ","Ỉ":"ỉ","Ị":"ị","Ọ":"ọ","Ỏ":"ỏ","Ố":"ố","Ồ":"ồ","Ổ":"ổ","Ỗ":"ỗ","Ộ":"ộ","Ớ":"ớ","Ờ":"ờ","Ở":"ở","Ỡ":"ỡ","Ợ":"ợ","Ụ":"ụ","Ủ":"ủ","Ứ":"ứ","Ừ":"ừ","Ử":"ử","Ữ":"ữ","Ự":"ự","Ỳ":"ỳ","Ỵ":"ỵ","Ỷ":"ỷ","Ỹ":"ỹ","Ỻ":"ỻ","Ỽ":"ỽ","Ỿ":"ỿ","Ἀ":"ἀ","Ἁ":"ἁ","Ἂ":"ἂ","Ἃ":"ἃ","Ἄ":"ἄ","Ἅ":"ἅ","Ἆ":"ἆ","Ἇ":"ἇ","Ἐ":"ἐ","Ἑ":"ἑ","Ἒ":"ἒ","Ἓ":"ἓ","Ἔ":"ἔ","Ἕ":"ἕ","Ἠ":"ἠ","Ἡ":"ἡ","Ἢ":"ἢ","Ἣ":"ἣ","Ἤ":"ἤ","Ἥ":"ἥ","Ἦ":"ἦ","Ἧ":"ἧ","Ἰ":"ἰ","Ἱ":"ἱ","Ἲ":"ἲ","Ἳ":"ἳ","Ἴ":"ἴ","Ἵ":"ἵ","Ἶ":"ἶ","Ἷ":"ἷ","Ὀ":"ὀ","Ὁ":"ὁ","Ὂ":"ὂ","Ὃ":"ὃ","Ὄ":"ὄ","Ὅ":"ὅ","Ὑ":"ὑ","Ὓ":"ὓ","Ὕ":"ὕ","Ὗ":"ὗ","Ὠ":"ὠ","Ὡ":"ὡ","Ὢ":"ὢ","Ὣ":"ὣ","Ὤ":"ὤ","Ὥ":"ὥ","Ὦ":"ὦ","Ὧ":"ὧ","ᾈ":"ᾀ","ᾉ":"ᾁ","ᾊ":"ᾂ","ᾋ":"ᾃ","ᾌ":"ᾄ","ᾍ":"ᾅ","ᾎ":"ᾆ","ᾏ":"ᾇ","ᾘ":"ᾐ","ᾙ":"ᾑ","ᾚ":"ᾒ","ᾛ":"ᾓ","ᾜ":"ᾔ","ᾝ":"ᾕ","ᾞ":"ᾖ","ᾟ":"ᾗ","ᾨ":"ᾠ","ᾩ":"ᾡ","ᾪ":"ᾢ","ᾫ":"ᾣ","ᾬ":"ᾤ","ᾭ":"ᾥ","ᾮ":"ᾦ","ᾯ":"ᾧ","Ᾰ":"ᾰ","Ᾱ":"ᾱ","Ὰ":"ὰ","Ά":"ά","ᾼ":"ᾳ","Ὲ":"ὲ","Έ":"έ","Ὴ":"ὴ","Ή":"ή","ῌ":"ῃ","Ῐ":"ῐ","Ῑ":"ῑ","Ὶ":"ὶ","Ί":"ί","Ῠ":"ῠ","Ῡ":"ῡ","Ὺ":"ὺ","Ύ":"ύ","Ῥ":"ῥ","Ὸ":"ὸ","Ό":"ό","Ὼ":"ὼ","Ώ":"ώ","ῼ":"ῳ","Ω":"ω","K":"k","Å":"å","Ⅎ":"ⅎ","Ⅰ":"ⅰ","Ⅱ":"ⅱ","Ⅲ":"ⅲ","Ⅳ":"ⅳ","Ⅴ":"ⅴ","Ⅵ":"ⅵ","Ⅶ":"ⅶ","Ⅷ":"ⅷ","Ⅸ":"ⅸ","Ⅹ":"ⅹ","Ⅺ":"ⅺ","Ⅻ":"ⅻ","Ⅼ":"ⅼ","Ⅽ":"ⅽ","Ⅾ":"ⅾ","Ⅿ":"ⅿ","Ↄ":"ↄ","Ⓐ":"ⓐ","Ⓑ":"ⓑ","Ⓒ":"ⓒ","Ⓓ":"ⓓ","Ⓔ":"ⓔ","Ⓕ":"ⓕ","Ⓖ":"ⓖ","Ⓗ":"ⓗ","Ⓘ":"ⓘ","Ⓙ":"ⓙ","Ⓚ":"ⓚ","Ⓛ":"ⓛ","Ⓜ":"ⓜ","Ⓝ":"ⓝ","Ⓞ":"ⓞ","Ⓟ":"ⓟ","Ⓠ":"ⓠ","Ⓡ":"ⓡ","Ⓢ":"ⓢ","Ⓣ":"ⓣ","Ⓤ":"ⓤ","Ⓥ":"ⓥ","Ⓦ":"ⓦ","Ⓧ":"ⓧ","Ⓨ":"ⓨ","Ⓩ":"ⓩ","Ⰰ":"ⰰ","Ⰱ":"ⰱ","Ⰲ":"ⰲ","Ⰳ":"ⰳ","Ⰴ":"ⰴ","Ⰵ":"ⰵ","Ⰶ":"ⰶ","Ⰷ":"ⰷ","Ⰸ":"ⰸ","Ⰹ":"ⰹ","Ⰺ":"ⰺ","Ⰻ":"ⰻ","Ⰼ":"ⰼ","Ⰽ":"ⰽ","Ⰾ":"ⰾ","Ⰿ":"ⰿ","Ⱀ":"ⱀ","Ⱁ":"ⱁ","Ⱂ":"ⱂ","Ⱃ":"ⱃ","Ⱄ":"ⱄ","Ⱅ":"ⱅ","Ⱆ":"ⱆ","Ⱇ":"ⱇ","Ⱈ":"ⱈ","Ⱉ":"ⱉ","Ⱊ":"ⱊ","Ⱋ":"ⱋ","Ⱌ":"ⱌ","Ⱍ":"ⱍ","Ⱎ":"ⱎ","Ⱏ":"ⱏ","Ⱐ":"ⱐ","Ⱑ":"ⱑ","Ⱒ":"ⱒ","Ⱓ":"ⱓ","Ⱔ":"ⱔ","Ⱕ":"ⱕ","Ⱖ":"ⱖ","Ⱗ":"ⱗ","Ⱘ":"ⱘ","Ⱙ":"ⱙ","Ⱚ":"ⱚ","Ⱛ":"ⱛ","Ⱜ":"ⱜ","Ⱝ":"ⱝ","Ⱞ":"ⱞ","Ⱟ":"ⱟ","Ⱡ":"ⱡ","Ɫ":"ɫ","Ᵽ":"ᵽ","Ɽ":"ɽ","Ⱨ":"ⱨ","Ⱪ":"ⱪ","Ⱬ":"ⱬ","Ɑ":"ɑ","Ɱ":"ɱ","Ɐ":"ɐ","Ɒ":"ɒ","Ⱳ":"ⱳ","Ⱶ":"ⱶ","Ȿ":"ȿ","Ɀ":"ɀ","Ⲁ":"ⲁ","Ⲃ":"ⲃ","Ⲅ":"ⲅ","Ⲇ":"ⲇ","Ⲉ":"ⲉ","Ⲋ":"ⲋ","Ⲍ":"ⲍ","Ⲏ":"ⲏ","Ⲑ":"ⲑ","Ⲓ":"ⲓ","Ⲕ":"ⲕ","Ⲗ":"ⲗ","Ⲙ":"ⲙ","Ⲛ":"ⲛ","Ⲝ":"ⲝ","Ⲟ":"ⲟ","Ⲡ":"ⲡ","Ⲣ":"ⲣ","Ⲥ":"ⲥ","Ⲧ":"ⲧ","Ⲩ":"ⲩ","Ⲫ":"ⲫ","Ⲭ":"ⲭ","Ⲯ":"ⲯ","Ⲱ":"ⲱ","Ⲳ":"ⲳ","Ⲵ":"ⲵ","Ⲷ":"ⲷ","Ⲹ":"ⲹ","Ⲻ":"ⲻ","Ⲽ":"ⲽ","Ⲿ":"ⲿ","Ⳁ":"ⳁ","Ⳃ":"ⳃ","Ⳅ":"ⳅ","Ⳇ":"ⳇ","Ⳉ":"ⳉ","Ⳋ":"ⳋ","Ⳍ":"ⳍ","Ⳏ":"ⳏ","Ⳑ":"ⳑ","Ⳓ":"ⳓ","Ⳕ":"ⳕ","Ⳗ":"ⳗ","Ⳙ":"ⳙ","Ⳛ":"ⳛ","Ⳝ":"ⳝ","Ⳟ":"ⳟ","Ⳡ":"ⳡ","Ⳣ":"ⳣ","Ⳬ":"ⳬ","Ⳮ":"ⳮ","Ⳳ":"ⳳ","Ꙁ":"ꙁ","Ꙃ":"ꙃ","Ꙅ":"ꙅ","Ꙇ":"ꙇ","Ꙉ":"ꙉ","Ꙋ":"ꙋ","Ꙍ":"ꙍ","Ꙏ":"ꙏ","Ꙑ":"ꙑ","Ꙓ":"ꙓ","Ꙕ":"ꙕ","Ꙗ":"ꙗ","Ꙙ":"ꙙ","Ꙛ":"ꙛ","Ꙝ":"ꙝ","Ꙟ":"ꙟ","Ꙡ":"ꙡ","Ꙣ":"ꙣ","Ꙥ":"ꙥ","Ꙧ":"ꙧ","Ꙩ":"ꙩ","Ꙫ":"ꙫ","Ꙭ":"ꙭ","Ꚁ":"ꚁ","Ꚃ":"ꚃ","Ꚅ":"ꚅ","Ꚇ":"ꚇ","Ꚉ":"ꚉ","Ꚋ":"ꚋ","Ꚍ":"ꚍ","Ꚏ":"ꚏ","Ꚑ":"ꚑ","Ꚓ":"ꚓ","Ꚕ":"ꚕ","Ꚗ":"ꚗ","Ꚙ":"ꚙ","Ꚛ":"ꚛ","Ꜣ":"ꜣ","Ꜥ":"ꜥ","Ꜧ":"ꜧ","Ꜩ":"ꜩ","Ꜫ":"ꜫ","Ꜭ":"ꜭ","Ꜯ":"ꜯ","Ꜳ":"ꜳ","Ꜵ":"ꜵ","Ꜷ":"ꜷ","Ꜹ":"ꜹ","Ꜻ":"ꜻ","Ꜽ":"ꜽ","Ꜿ":"ꜿ","Ꝁ":"ꝁ","Ꝃ":"ꝃ","Ꝅ":"ꝅ","Ꝇ":"ꝇ","Ꝉ":"ꝉ","Ꝋ":"ꝋ","Ꝍ":"ꝍ","Ꝏ":"ꝏ","Ꝑ":"ꝑ","Ꝓ":"ꝓ","Ꝕ":"ꝕ","Ꝗ":"ꝗ","Ꝙ":"ꝙ","Ꝛ":"ꝛ","Ꝝ":"ꝝ","Ꝟ":"ꝟ","Ꝡ":"ꝡ","Ꝣ":"ꝣ","Ꝥ":"ꝥ","Ꝧ":"ꝧ","Ꝩ":"ꝩ","Ꝫ":"ꝫ","Ꝭ":"ꝭ","Ꝯ":"ꝯ","Ꝺ":"ꝺ","Ꝼ":"ꝼ","Ᵹ":"ᵹ","Ꝿ":"ꝿ","Ꞁ":"ꞁ","Ꞃ":"ꞃ","Ꞅ":"ꞅ","Ꞇ":"ꞇ","Ꞌ":"ꞌ","Ɥ":"ɥ","Ꞑ":"ꞑ","Ꞓ":"ꞓ","Ꞗ":"ꞗ","Ꞙ":"ꞙ","Ꞛ":"ꞛ","Ꞝ":"ꞝ","Ꞟ":"ꞟ","Ꞡ":"ꞡ","Ꞣ":"ꞣ","Ꞥ":"ꞥ","Ꞧ":"ꞧ","Ꞩ":"ꞩ","Ɦ":"ɦ","Ɜ":"ɜ","Ɡ":"ɡ","Ɬ":"ɬ","Ɪ":"ɪ","Ʞ":"ʞ","Ʇ":"ʇ","Ʝ":"ʝ","Ꭓ":"ꭓ","Ꞵ":"ꞵ","Ꞷ":"ꞷ","Ꞹ":"ꞹ","Ꞻ":"ꞻ","Ꞽ":"ꞽ","Ꞿ":"ꞿ","Ꟁ":"ꟁ","Ꟃ":"ꟃ","Ꞔ":"ꞔ","Ʂ":"ʂ","Ᶎ":"ᶎ","Ꟈ":"ꟈ","Ꟊ":"ꟊ","Ɤ":"ɤ","Ꟍ":"ꟍ","Ꟑ":"ꟑ","Ꟗ":"ꟗ","Ꟙ":"ꟙ","Ꟛ":"ꟛ","Ƛ":"ƛ","Ꟶ":"ꟶ","A":"a","B":"b","C":"c","D":"d","E":"e","F":"f","G":"g","H":"h","I":"i","J":"j","K":"k","L":"l","M":"m","N":"n","O":"o","P":"p","Q":"q","R":"r","S":"s","T":"t","U":"u","V":"v","W":"w","X":"x","Y":"y","Z":"z","𐐀":"𐐨","𐐁":"𐐩","𐐂":"𐐪","𐐃":"𐐫","𐐄":"𐐬","𐐅":"𐐭","𐐆":"𐐮","𐐇":"𐐯","𐐈":"𐐰","𐐉":"𐐱","𐐊":"𐐲","𐐋":"𐐳","𐐌":"𐐴","𐐍":"𐐵","𐐎":"𐐶","𐐏":"𐐷","𐐐":"𐐸","𐐑":"𐐹","𐐒":"𐐺","𐐓":"𐐻","𐐔":"𐐼","𐐕":"𐐽","𐐖":"𐐾","𐐗":"𐐿","𐐘":"𐑀","𐐙":"𐑁","𐐚":"𐑂","𐐛":"𐑃","𐐜":"𐑄","𐐝":"𐑅","𐐞":"𐑆","𐐟":"𐑇","𐐠":"𐑈","𐐡":"𐑉","𐐢":"𐑊","𐐣":"𐑋","𐐤":"𐑌","𐐥":"𐑍","𐐦":"𐑎","𐐧":"𐑏","𐒰":"𐓘","𐒱":"𐓙","𐒲":"𐓚","𐒳":"𐓛","𐒴":"𐓜","𐒵":"𐓝","𐒶":"𐓞","𐒷":"𐓟","𐒸":"𐓠","𐒹":"𐓡","𐒺":"𐓢","𐒻":"𐓣","𐒼":"𐓤","𐒽":"𐓥","𐒾":"𐓦","𐒿":"𐓧","𐓀":"𐓨","𐓁":"𐓩","𐓂":"𐓪","𐓃":"𐓫","𐓄":"𐓬","𐓅":"𐓭","𐓆":"𐓮","𐓇":"𐓯","𐓈":"𐓰","𐓉":"𐓱","𐓊":"𐓲","𐓋":"𐓳","𐓌":"𐓴","𐓍":"𐓵","𐓎":"𐓶","𐓏":"𐓷","𐓐":"𐓸","𐓑":"𐓹","𐓒":"𐓺","𐓓":"𐓻","𐕰":"𐖗","𐕱":"𐖘","𐕲":"𐖙","𐕳":"𐖚","𐕴":"𐖛","𐕵":"𐖜","𐕶":"𐖝","𐕷":"𐖞","𐕸":"𐖟","𐕹":"𐖠","𐕺":"𐖡","𐕼":"𐖣","𐕽":"𐖤","𐕾":"𐖥","𐕿":"𐖦","𐖀":"𐖧","𐖁":"𐖨","𐖂":"𐖩","𐖃":"𐖪","𐖄":"𐖫","𐖅":"𐖬","𐖆":"𐖭","𐖇":"𐖮","𐖈":"𐖯","𐖉":"𐖰","𐖊":"𐖱","𐖌":"𐖳","𐖍":"𐖴","𐖎":"𐖵","𐖏":"𐖶","𐖐":"𐖷","𐖑":"𐖸","𐖒":"𐖹","𐖔":"𐖻","𐖕":"𐖼","𐲀":"𐳀","𐲁":"𐳁","𐲂":"𐳂","𐲃":"𐳃","𐲄":"𐳄","𐲅":"𐳅","𐲆":"𐳆","𐲇":"𐳇","𐲈":"𐳈","𐲉":"𐳉","𐲊":"𐳊","𐲋":"𐳋","𐲌":"𐳌","𐲍":"𐳍","𐲎":"𐳎","𐲏":"𐳏","𐲐":"𐳐","𐲑":"𐳑","𐲒":"𐳒","𐲓":"𐳓","𐲔":"𐳔","𐲕":"𐳕","𐲖":"𐳖","𐲗":"𐳗","𐲘":"𐳘","𐲙":"𐳙","𐲚":"𐳚","𐲛":"𐳛","𐲜":"𐳜","𐲝":"𐳝","𐲞":"𐳞","𐲟":"𐳟","𐲠":"𐳠","𐲡":"𐳡","𐲢":"𐳢","𐲣":"𐳣","𐲤":"𐳤","𐲥":"𐳥","𐲦":"𐳦","𐲧":"𐳧","𐲨":"𐳨","𐲩":"𐳩","𐲪":"𐳪","𐲫":"𐳫","𐲬":"𐳬","𐲭":"𐳭","𐲮":"𐳮","𐲯":"𐳯","𐲰":"𐳰","𐲱":"𐳱","𐲲":"𐳲","𐵐":"𐵰","𐵑":"𐵱","𐵒":"𐵲","𐵓":"𐵳","𐵔":"𐵴","𐵕":"𐵵","𐵖":"𐵶","𐵗":"𐵷","𐵘":"𐵸","𐵙":"𐵹","𐵚":"𐵺","𐵛":"𐵻","𐵜":"𐵼","𐵝":"𐵽","𐵞":"𐵾","𐵟":"𐵿","𐵠":"𐶀","𐵡":"𐶁","𐵢":"𐶂","𐵣":"𐶃","𐵤":"𐶄","𐵥":"𐶅","𑢠":"𑣀","𑢡":"𑣁","𑢢":"𑣂","𑢣":"𑣃","𑢤":"𑣄","𑢥":"𑣅","𑢦":"𑣆","𑢧":"𑣇","𑢨":"𑣈","𑢩":"𑣉","𑢪":"𑣊","𑢫":"𑣋","𑢬":"𑣌","𑢭":"𑣍","𑢮":"𑣎","𑢯":"𑣏","𑢰":"𑣐","𑢱":"𑣑","𑢲":"𑣒","𑢳":"𑣓","𑢴":"𑣔","𑢵":"𑣕","𑢶":"𑣖","𑢷":"𑣗","𑢸":"𑣘","𑢹":"𑣙","𑢺":"𑣚","𑢻":"𑣛","𑢼":"𑣜","𑢽":"𑣝","𑢾":"𑣞","𑢿":"𑣟","𖹀":"𖹠","𖹁":"𖹡","𖹂":"𖹢","𖹃":"𖹣","𖹄":"𖹤","𖹅":"𖹥","𖹆":"𖹦","𖹇":"𖹧","𖹈":"𖹨","𖹉":"𖹩","𖹊":"𖹪","𖹋":"𖹫","𖹌":"𖹬","𖹍":"𖹭","𖹎":"𖹮","𖹏":"𖹯","𖹐":"𖹰","𖹑":"𖹱","𖹒":"𖹲","𖹓":"𖹳","𖹔":"𖹴","𖹕":"𖹵","𖹖":"𖹶","𖹗":"𖹷","𖹘":"𖹸","𖹙":"𖹹","𖹚":"𖹺","𖹛":"𖹻","𖹜":"𖹼","𖹝":"𖹽","𖹞":"𖹾","𖹟":"𖹿","𞤀":"𞤢","𞤁":"𞤣","𞤂":"𞤤","𞤃":"𞤥","𞤄":"𞤦","𞤅":"𞤧","𞤆":"𞤨","𞤇":"𞤩","𞤈":"𞤪","𞤉":"𞤫","𞤊":"𞤬","𞤋":"𞤭","𞤌":"𞤮","𞤍":"𞤯","𞤎":"𞤰","𞤏":"𞤱","𞤐":"𞤲","𞤑":"𞤳","𞤒":"𞤴","𞤓":"𞤵","𞤔":"𞤶","𞤕":"𞤷","𞤖":"𞤸","𞤗":"𞤹","𞤘":"𞤺","𞤙":"𞤻","𞤚":"𞤼","𞤛":"𞤽","𞤜":"𞤾","𞤝":"𞤿","𞤞":"𞥀","𞤟":"𞥁","𞤠":"𞥂","𞤡":"𞥃"} + +data modify storage bs:const string.upper set value {"a":"A","b":"B","c":"C","d":"D","e":"E","f":"F","g":"G","h":"H","i":"İ","j":"J","k":"K","l":"L","m":"M","n":"N","o":"O","p":"P","q":"Q","r":"R","s":"S","t":"T","u":"U","v":"V","w":"W","x":"X","y":"Y","z":"Z","à":"À","á":"Á","â":"Â","ã":"Ã","ä":"Ä","å":"Å","æ":"Æ","ç":"Ç","è":"È","é":"É","ê":"Ê","ë":"Ë","ì":"Ì","í":"Í","î":"Î","ï":"Ï","ð":"Ð","ñ":"Ñ","ò":"Ò","ó":"Ó","ô":"Ô","õ":"Õ","ö":"Ö","ø":"Ø","ù":"Ù","ú":"Ú","û":"Û","ü":"Ü","ý":"Ý","þ":"Þ","ā":"Ā","ă":"Ă","ą":"Ą","ć":"Ć","ĉ":"Ĉ","ċ":"Ċ","č":"Č","ď":"Ď","đ":"Đ","ē":"Ē","ĕ":"Ĕ","ė":"Ė","ę":"Ę","ě":"Ě","ĝ":"Ĝ","ğ":"Ğ","ġ":"Ġ","ģ":"Ģ","ĥ":"Ĥ","ħ":"Ħ","ĩ":"Ĩ","ī":"Ī","ĭ":"Ĭ","į":"Į","ij":"IJ","ĵ":"Ĵ","ķ":"Ķ","ĺ":"Ĺ","ļ":"Ļ","ľ":"Ľ","ŀ":"Ŀ","ł":"Ł","ń":"Ń","ņ":"Ņ","ň":"Ň","ŋ":"Ŋ","ō":"Ō","ŏ":"Ŏ","ő":"Ő","œ":"Œ","ŕ":"Ŕ","ŗ":"Ŗ","ř":"Ř","ś":"Ś","ŝ":"Ŝ","ş":"Ş","š":"Š","ţ":"Ţ","ť":"Ť","ŧ":"Ŧ","ũ":"Ũ","ū":"Ū","ŭ":"Ŭ","ů":"Ů","ű":"Ű","ų":"Ų","ŵ":"Ŵ","ŷ":"Ŷ","ÿ":"Ÿ","ź":"Ź","ż":"Ż","ž":"Ž","ɓ":"Ɓ","ƃ":"Ƃ","ƅ":"Ƅ","ɔ":"Ɔ","ƈ":"Ƈ","ɖ":"Ɖ","ɗ":"Ɗ","ƌ":"Ƌ","ǝ":"Ǝ","ə":"Ə","ɛ":"Ɛ","ƒ":"Ƒ","ɠ":"Ɠ","ɣ":"Ɣ","ɩ":"Ɩ","ɨ":"Ɨ","ƙ":"Ƙ","ɯ":"Ɯ","ɲ":"Ɲ","ɵ":"Ɵ","ơ":"Ơ","ƣ":"Ƣ","ƥ":"Ƥ","ʀ":"Ʀ","ƨ":"Ƨ","ʃ":"Ʃ","ƭ":"Ƭ","ʈ":"Ʈ","ư":"Ư","ʊ":"Ʊ","ʋ":"Ʋ","ƴ":"Ƴ","ƶ":"Ƶ","ʒ":"Ʒ","ƹ":"Ƹ","ƽ":"Ƽ","dž":"Dž","lj":"Lj","nj":"Nj","ǎ":"Ǎ","ǐ":"Ǐ","ǒ":"Ǒ","ǔ":"Ǔ","ǖ":"Ǖ","ǘ":"Ǘ","ǚ":"Ǚ","ǜ":"Ǜ","ǟ":"Ǟ","ǡ":"Ǡ","ǣ":"Ǣ","ǥ":"Ǥ","ǧ":"Ǧ","ǩ":"Ǩ","ǫ":"Ǫ","ǭ":"Ǭ","ǯ":"Ǯ","dz":"Dz","ǵ":"Ǵ","ƕ":"Ƕ","ƿ":"Ƿ","ǹ":"Ǹ","ǻ":"Ǻ","ǽ":"Ǽ","ǿ":"Ǿ","ȁ":"Ȁ","ȃ":"Ȃ","ȅ":"Ȅ","ȇ":"Ȇ","ȉ":"Ȉ","ȋ":"Ȋ","ȍ":"Ȍ","ȏ":"Ȏ","ȑ":"Ȑ","ȓ":"Ȓ","ȕ":"Ȕ","ȗ":"Ȗ","ș":"Ș","ț":"Ț","ȝ":"Ȝ","ȟ":"Ȟ","ƞ":"Ƞ","ȣ":"Ȣ","ȥ":"Ȥ","ȧ":"Ȧ","ȩ":"Ȩ","ȫ":"Ȫ","ȭ":"Ȭ","ȯ":"Ȯ","ȱ":"Ȱ","ȳ":"Ȳ","ⱥ":"Ⱥ","ȼ":"Ȼ","ƚ":"Ƚ","ⱦ":"Ⱦ","ɂ":"Ɂ","ƀ":"Ƀ","ʉ":"Ʉ","ʌ":"Ʌ","ɇ":"Ɇ","ɉ":"Ɉ","ɋ":"Ɋ","ɍ":"Ɍ","ɏ":"Ɏ","ͱ":"Ͱ","ͳ":"Ͳ","ͷ":"Ͷ","ϳ":"Ϳ","ά":"Ά","έ":"Έ","ή":"Ή","ί":"Ί","ό":"Ό","ύ":"Ύ","ώ":"Ώ","α":"Α","β":"Β","γ":"Γ","δ":"Δ","ε":"Ε","ζ":"Ζ","η":"Η","θ":"ϴ","ι":"Ι","κ":"Κ","λ":"Λ","μ":"Μ","ν":"Ν","ξ":"Ξ","ο":"Ο","π":"Π","ρ":"Ρ","σ":"Σ","τ":"Τ","υ":"Υ","φ":"Φ","χ":"Χ","ψ":"Ψ","ω":"Ω","ϊ":"Ϊ","ϋ":"Ϋ","ϗ":"Ϗ","ϙ":"Ϙ","ϛ":"Ϛ","ϝ":"Ϝ","ϟ":"Ϟ","ϡ":"Ϡ","ϣ":"Ϣ","ϥ":"Ϥ","ϧ":"Ϧ","ϩ":"Ϩ","ϫ":"Ϫ","ϭ":"Ϭ","ϯ":"Ϯ","ϸ":"Ϸ","ϲ":"Ϲ","ϻ":"Ϻ","ͻ":"Ͻ","ͼ":"Ͼ","ͽ":"Ͽ","ѐ":"Ѐ","ё":"Ё","ђ":"Ђ","ѓ":"Ѓ","є":"Є","ѕ":"Ѕ","і":"І","ї":"Ї","ј":"Ј","љ":"Љ","њ":"Њ","ћ":"Ћ","ќ":"Ќ","ѝ":"Ѝ","ў":"Ў","џ":"Џ","а":"А","б":"Б","в":"В","г":"Г","д":"Д","е":"Е","ж":"Ж","з":"З","и":"И","й":"Й","к":"К","л":"Л","м":"М","н":"Н","о":"О","п":"П","р":"Р","с":"С","т":"Т","у":"У","ф":"Ф","х":"Х","ц":"Ц","ч":"Ч","ш":"Ш","щ":"Щ","ъ":"Ъ","ы":"Ы","ь":"Ь","э":"Э","ю":"Ю","я":"Я","ѡ":"Ѡ","ѣ":"Ѣ","ѥ":"Ѥ","ѧ":"Ѧ","ѩ":"Ѩ","ѫ":"Ѫ","ѭ":"Ѭ","ѯ":"Ѯ","ѱ":"Ѱ","ѳ":"Ѳ","ѵ":"Ѵ","ѷ":"Ѷ","ѹ":"Ѹ","ѻ":"Ѻ","ѽ":"Ѽ","ѿ":"Ѿ","ҁ":"Ҁ","ҋ":"Ҋ","ҍ":"Ҍ","ҏ":"Ҏ","ґ":"Ґ","ғ":"Ғ","ҕ":"Ҕ","җ":"Җ","ҙ":"Ҙ","қ":"Қ","ҝ":"Ҝ","ҟ":"Ҟ","ҡ":"Ҡ","ң":"Ң","ҥ":"Ҥ","ҧ":"Ҧ","ҩ":"Ҩ","ҫ":"Ҫ","ҭ":"Ҭ","ү":"Ү","ұ":"Ұ","ҳ":"Ҳ","ҵ":"Ҵ","ҷ":"Ҷ","ҹ":"Ҹ","һ":"Һ","ҽ":"Ҽ","ҿ":"Ҿ","ӏ":"Ӏ","ӂ":"Ӂ","ӄ":"Ӄ","ӆ":"Ӆ","ӈ":"Ӈ","ӊ":"Ӊ","ӌ":"Ӌ","ӎ":"Ӎ","ӑ":"Ӑ","ӓ":"Ӓ","ӕ":"Ӕ","ӗ":"Ӗ","ә":"Ә","ӛ":"Ӛ","ӝ":"Ӝ","ӟ":"Ӟ","ӡ":"Ӡ","ӣ":"Ӣ","ӥ":"Ӥ","ӧ":"Ӧ","ө":"Ө","ӫ":"Ӫ","ӭ":"Ӭ","ӯ":"Ӯ","ӱ":"Ӱ","ӳ":"Ӳ","ӵ":"Ӵ","ӷ":"Ӷ","ӹ":"Ӹ","ӻ":"Ӻ","ӽ":"Ӽ","ӿ":"Ӿ","ԁ":"Ԁ","ԃ":"Ԃ","ԅ":"Ԅ","ԇ":"Ԇ","ԉ":"Ԉ","ԋ":"Ԋ","ԍ":"Ԍ","ԏ":"Ԏ","ԑ":"Ԑ","ԓ":"Ԓ","ԕ":"Ԕ","ԗ":"Ԗ","ԙ":"Ԙ","ԛ":"Ԛ","ԝ":"Ԝ","ԟ":"Ԟ","ԡ":"Ԡ","ԣ":"Ԣ","ԥ":"Ԥ","ԧ":"Ԧ","ԩ":"Ԩ","ԫ":"Ԫ","ԭ":"Ԭ","ԯ":"Ԯ","ա":"Ա","բ":"Բ","գ":"Գ","դ":"Դ","ե":"Ե","զ":"Զ","է":"Է","ը":"Ը","թ":"Թ","ժ":"Ժ","ի":"Ի","լ":"Լ","խ":"Խ","ծ":"Ծ","կ":"Կ","հ":"Հ","ձ":"Ձ","ղ":"Ղ","ճ":"Ճ","մ":"Մ","յ":"Յ","ն":"Ն","շ":"Շ","ո":"Ո","չ":"Չ","պ":"Պ","ջ":"Ջ","ռ":"Ռ","ս":"Ս","վ":"Վ","տ":"Տ","ր":"Ր","ց":"Ց","ւ":"Ւ","փ":"Փ","ք":"Ք","օ":"Օ","ֆ":"Ֆ","ⴀ":"Ⴀ","ⴁ":"Ⴁ","ⴂ":"Ⴂ","ⴃ":"Ⴃ","ⴄ":"Ⴄ","ⴅ":"Ⴅ","ⴆ":"Ⴆ","ⴇ":"Ⴇ","ⴈ":"Ⴈ","ⴉ":"Ⴉ","ⴊ":"Ⴊ","ⴋ":"Ⴋ","ⴌ":"Ⴌ","ⴍ":"Ⴍ","ⴎ":"Ⴎ","ⴏ":"Ⴏ","ⴐ":"Ⴐ","ⴑ":"Ⴑ","ⴒ":"Ⴒ","ⴓ":"Ⴓ","ⴔ":"Ⴔ","ⴕ":"Ⴕ","ⴖ":"Ⴖ","ⴗ":"Ⴗ","ⴘ":"Ⴘ","ⴙ":"Ⴙ","ⴚ":"Ⴚ","ⴛ":"Ⴛ","ⴜ":"Ⴜ","ⴝ":"Ⴝ","ⴞ":"Ⴞ","ⴟ":"Ⴟ","ⴠ":"Ⴠ","ⴡ":"Ⴡ","ⴢ":"Ⴢ","ⴣ":"Ⴣ","ⴤ":"Ⴤ","ⴥ":"Ⴥ","ⴧ":"Ⴧ","ⴭ":"Ⴭ","ꭰ":"Ꭰ","ꭱ":"Ꭱ","ꭲ":"Ꭲ","ꭳ":"Ꭳ","ꭴ":"Ꭴ","ꭵ":"Ꭵ","ꭶ":"Ꭶ","ꭷ":"Ꭷ","ꭸ":"Ꭸ","ꭹ":"Ꭹ","ꭺ":"Ꭺ","ꭻ":"Ꭻ","ꭼ":"Ꭼ","ꭽ":"Ꭽ","ꭾ":"Ꭾ","ꭿ":"Ꭿ","ꮀ":"Ꮀ","ꮁ":"Ꮁ","ꮂ":"Ꮂ","ꮃ":"Ꮃ","ꮄ":"Ꮄ","ꮅ":"Ꮅ","ꮆ":"Ꮆ","ꮇ":"Ꮇ","ꮈ":"Ꮈ","ꮉ":"Ꮉ","ꮊ":"Ꮊ","ꮋ":"Ꮋ","ꮌ":"Ꮌ","ꮍ":"Ꮍ","ꮎ":"Ꮎ","ꮏ":"Ꮏ","ꮐ":"Ꮐ","ꮑ":"Ꮑ","ꮒ":"Ꮒ","ꮓ":"Ꮓ","ꮔ":"Ꮔ","ꮕ":"Ꮕ","ꮖ":"Ꮖ","ꮗ":"Ꮗ","ꮘ":"Ꮘ","ꮙ":"Ꮙ","ꮚ":"Ꮚ","ꮛ":"Ꮛ","ꮜ":"Ꮜ","ꮝ":"Ꮝ","ꮞ":"Ꮞ","ꮟ":"Ꮟ","ꮠ":"Ꮠ","ꮡ":"Ꮡ","ꮢ":"Ꮢ","ꮣ":"Ꮣ","ꮤ":"Ꮤ","ꮥ":"Ꮥ","ꮦ":"Ꮦ","ꮧ":"Ꮧ","ꮨ":"Ꮨ","ꮩ":"Ꮩ","ꮪ":"Ꮪ","ꮫ":"Ꮫ","ꮬ":"Ꮬ","ꮭ":"Ꮭ","ꮮ":"Ꮮ","ꮯ":"Ꮯ","ꮰ":"Ꮰ","ꮱ":"Ꮱ","ꮲ":"Ꮲ","ꮳ":"Ꮳ","ꮴ":"Ꮴ","ꮵ":"Ꮵ","ꮶ":"Ꮶ","ꮷ":"Ꮷ","ꮸ":"Ꮸ","ꮹ":"Ꮹ","ꮺ":"Ꮺ","ꮻ":"Ꮻ","ꮼ":"Ꮼ","ꮽ":"Ꮽ","ꮾ":"Ꮾ","ꮿ":"Ꮿ","ᏸ":"Ᏸ","ᏹ":"Ᏹ","ᏺ":"Ᏺ","ᏻ":"Ᏻ","ᏼ":"Ᏼ","ᏽ":"Ᏽ","ᲊ":"Ᲊ","ა":"Ა","ბ":"Ბ","გ":"Გ","დ":"Დ","ე":"Ე","ვ":"Ვ","ზ":"Ზ","თ":"Თ","ი":"Ი","კ":"Კ","ლ":"Ლ","მ":"Მ","ნ":"Ნ","ო":"Ო","პ":"Პ","ჟ":"Ჟ","რ":"Რ","ს":"Ს","ტ":"Ტ","უ":"Უ","ფ":"Ფ","ქ":"Ქ","ღ":"Ღ","ყ":"Ყ","შ":"Შ","ჩ":"Ჩ","ც":"Ც","ძ":"Ძ","წ":"Წ","ჭ":"Ჭ","ხ":"Ხ","ჯ":"Ჯ","ჰ":"Ჰ","ჱ":"Ჱ","ჲ":"Ჲ","ჳ":"Ჳ","ჴ":"Ჴ","ჵ":"Ჵ","ჶ":"Ჶ","ჷ":"Ჷ","ჸ":"Ჸ","ჹ":"Ჹ","ჺ":"Ჺ","ჽ":"Ჽ","ჾ":"Ჾ","ჿ":"Ჿ","ḁ":"Ḁ","ḃ":"Ḃ","ḅ":"Ḅ","ḇ":"Ḇ","ḉ":"Ḉ","ḋ":"Ḋ","ḍ":"Ḍ","ḏ":"Ḏ","ḑ":"Ḑ","ḓ":"Ḓ","ḕ":"Ḕ","ḗ":"Ḗ","ḙ":"Ḙ","ḛ":"Ḛ","ḝ":"Ḝ","ḟ":"Ḟ","ḡ":"Ḡ","ḣ":"Ḣ","ḥ":"Ḥ","ḧ":"Ḧ","ḩ":"Ḩ","ḫ":"Ḫ","ḭ":"Ḭ","ḯ":"Ḯ","ḱ":"Ḱ","ḳ":"Ḳ","ḵ":"Ḵ","ḷ":"Ḷ","ḹ":"Ḹ","ḻ":"Ḻ","ḽ":"Ḽ","ḿ":"Ḿ","ṁ":"Ṁ","ṃ":"Ṃ","ṅ":"Ṅ","ṇ":"Ṇ","ṉ":"Ṉ","ṋ":"Ṋ","ṍ":"Ṍ","ṏ":"Ṏ","ṑ":"Ṑ","ṓ":"Ṓ","ṕ":"Ṕ","ṗ":"Ṗ","ṙ":"Ṙ","ṛ":"Ṛ","ṝ":"Ṝ","ṟ":"Ṟ","ṡ":"Ṡ","ṣ":"Ṣ","ṥ":"Ṥ","ṧ":"Ṧ","ṩ":"Ṩ","ṫ":"Ṫ","ṭ":"Ṭ","ṯ":"Ṯ","ṱ":"Ṱ","ṳ":"Ṳ","ṵ":"Ṵ","ṷ":"Ṷ","ṹ":"Ṹ","ṻ":"Ṻ","ṽ":"Ṽ","ṿ":"Ṿ","ẁ":"Ẁ","ẃ":"Ẃ","ẅ":"Ẅ","ẇ":"Ẇ","ẉ":"Ẉ","ẋ":"Ẋ","ẍ":"Ẍ","ẏ":"Ẏ","ẑ":"Ẑ","ẓ":"Ẓ","ẕ":"Ẕ","ß":"ẞ","ạ":"Ạ","ả":"Ả","ấ":"Ấ","ầ":"Ầ","ẩ":"Ẩ","ẫ":"Ẫ","ậ":"Ậ","ắ":"Ắ","ằ":"Ằ","ẳ":"Ẳ","ẵ":"Ẵ","ặ":"Ặ","ẹ":"Ẹ","ẻ":"Ẻ","ẽ":"Ẽ","ế":"Ế","ề":"Ề","ể":"Ể","ễ":"Ễ","ệ":"Ệ","ỉ":"Ỉ","ị":"Ị","ọ":"Ọ","ỏ":"Ỏ","ố":"Ố","ồ":"Ồ","ổ":"Ổ","ỗ":"Ỗ","ộ":"Ộ","ớ":"Ớ","ờ":"Ờ","ở":"Ở","ỡ":"Ỡ","ợ":"Ợ","ụ":"Ụ","ủ":"Ủ","ứ":"Ứ","ừ":"Ừ","ử":"Ử","ữ":"Ữ","ự":"Ự","ỳ":"Ỳ","ỵ":"Ỵ","ỷ":"Ỷ","ỹ":"Ỹ","ỻ":"Ỻ","ỽ":"Ỽ","ỿ":"Ỿ","ἀ":"Ἀ","ἁ":"Ἁ","ἂ":"Ἂ","ἃ":"Ἃ","ἄ":"Ἄ","ἅ":"Ἅ","ἆ":"Ἆ","ἇ":"Ἇ","ἐ":"Ἐ","ἑ":"Ἑ","ἒ":"Ἒ","ἓ":"Ἓ","ἔ":"Ἔ","ἕ":"Ἕ","ἠ":"Ἠ","ἡ":"Ἡ","ἢ":"Ἢ","ἣ":"Ἣ","ἤ":"Ἤ","ἥ":"Ἥ","ἦ":"Ἦ","ἧ":"Ἧ","ἰ":"Ἰ","ἱ":"Ἱ","ἲ":"Ἲ","ἳ":"Ἳ","ἴ":"Ἴ","ἵ":"Ἵ","ἶ":"Ἶ","ἷ":"Ἷ","ὀ":"Ὀ","ὁ":"Ὁ","ὂ":"Ὂ","ὃ":"Ὃ","ὄ":"Ὄ","ὅ":"Ὅ","ὑ":"Ὑ","ὓ":"Ὓ","ὕ":"Ὕ","ὗ":"Ὗ","ὠ":"Ὠ","ὡ":"Ὡ","ὢ":"Ὢ","ὣ":"Ὣ","ὤ":"Ὤ","ὥ":"Ὥ","ὦ":"Ὦ","ὧ":"Ὧ","ᾀ":"ᾈ","ᾁ":"ᾉ","ᾂ":"ᾊ","ᾃ":"ᾋ","ᾄ":"ᾌ","ᾅ":"ᾍ","ᾆ":"ᾎ","ᾇ":"ᾏ","ᾐ":"ᾘ","ᾑ":"ᾙ","ᾒ":"ᾚ","ᾓ":"ᾛ","ᾔ":"ᾜ","ᾕ":"ᾝ","ᾖ":"ᾞ","ᾗ":"ᾟ","ᾠ":"ᾨ","ᾡ":"ᾩ","ᾢ":"ᾪ","ᾣ":"ᾫ","ᾤ":"ᾬ","ᾥ":"ᾭ","ᾦ":"ᾮ","ᾧ":"ᾯ","ᾰ":"Ᾰ","ᾱ":"Ᾱ","ὰ":"Ὰ","ά":"Ά","ᾳ":"ᾼ","ὲ":"Ὲ","έ":"Έ","ὴ":"Ὴ","ή":"Ή","ῃ":"ῌ","ῐ":"Ῐ","ῑ":"Ῑ","ὶ":"Ὶ","ί":"Ί","ῠ":"Ῠ","ῡ":"Ῡ","ὺ":"Ὺ","ύ":"Ύ","ῥ":"Ῥ","ὸ":"Ὸ","ό":"Ό","ὼ":"Ὼ","ώ":"Ώ","ῳ":"ῼ","ⅎ":"Ⅎ","ⅰ":"Ⅰ","ⅱ":"Ⅱ","ⅲ":"Ⅲ","ⅳ":"Ⅳ","ⅴ":"Ⅴ","ⅵ":"Ⅵ","ⅶ":"Ⅶ","ⅷ":"Ⅷ","ⅸ":"Ⅸ","ⅹ":"Ⅹ","ⅺ":"Ⅺ","ⅻ":"Ⅻ","ⅼ":"Ⅼ","ⅽ":"Ⅽ","ⅾ":"Ⅾ","ⅿ":"Ⅿ","ↄ":"Ↄ","ⓐ":"Ⓐ","ⓑ":"Ⓑ","ⓒ":"Ⓒ","ⓓ":"Ⓓ","ⓔ":"Ⓔ","ⓕ":"Ⓕ","ⓖ":"Ⓖ","ⓗ":"Ⓗ","ⓘ":"Ⓘ","ⓙ":"Ⓙ","ⓚ":"Ⓚ","ⓛ":"Ⓛ","ⓜ":"Ⓜ","ⓝ":"Ⓝ","ⓞ":"Ⓞ","ⓟ":"Ⓟ","ⓠ":"Ⓠ","ⓡ":"Ⓡ","ⓢ":"Ⓢ","ⓣ":"Ⓣ","ⓤ":"Ⓤ","ⓥ":"Ⓥ","ⓦ":"Ⓦ","ⓧ":"Ⓧ","ⓨ":"Ⓨ","ⓩ":"Ⓩ","ⰰ":"Ⰰ","ⰱ":"Ⰱ","ⰲ":"Ⰲ","ⰳ":"Ⰳ","ⰴ":"Ⰴ","ⰵ":"Ⰵ","ⰶ":"Ⰶ","ⰷ":"Ⰷ","ⰸ":"Ⰸ","ⰹ":"Ⰹ","ⰺ":"Ⰺ","ⰻ":"Ⰻ","ⰼ":"Ⰼ","ⰽ":"Ⰽ","ⰾ":"Ⰾ","ⰿ":"Ⰿ","ⱀ":"Ⱀ","ⱁ":"Ⱁ","ⱂ":"Ⱂ","ⱃ":"Ⱃ","ⱄ":"Ⱄ","ⱅ":"Ⱅ","ⱆ":"Ⱆ","ⱇ":"Ⱇ","ⱈ":"Ⱈ","ⱉ":"Ⱉ","ⱊ":"Ⱊ","ⱋ":"Ⱋ","ⱌ":"Ⱌ","ⱍ":"Ⱍ","ⱎ":"Ⱎ","ⱏ":"Ⱏ","ⱐ":"Ⱐ","ⱑ":"Ⱑ","ⱒ":"Ⱒ","ⱓ":"Ⱓ","ⱔ":"Ⱔ","ⱕ":"Ⱕ","ⱖ":"Ⱖ","ⱗ":"Ⱗ","ⱘ":"Ⱘ","ⱙ":"Ⱙ","ⱚ":"Ⱚ","ⱛ":"Ⱛ","ⱜ":"Ⱜ","ⱝ":"Ⱝ","ⱞ":"Ⱞ","ⱟ":"Ⱟ","ⱡ":"Ⱡ","ɫ":"Ɫ","ᵽ":"Ᵽ","ɽ":"Ɽ","ⱨ":"Ⱨ","ⱪ":"Ⱪ","ⱬ":"Ⱬ","ɑ":"Ɑ","ɱ":"Ɱ","ɐ":"Ɐ","ɒ":"Ɒ","ⱳ":"Ⱳ","ⱶ":"Ⱶ","ȿ":"Ȿ","ɀ":"Ɀ","ⲁ":"Ⲁ","ⲃ":"Ⲃ","ⲅ":"Ⲅ","ⲇ":"Ⲇ","ⲉ":"Ⲉ","ⲋ":"Ⲋ","ⲍ":"Ⲍ","ⲏ":"Ⲏ","ⲑ":"Ⲑ","ⲓ":"Ⲓ","ⲕ":"Ⲕ","ⲗ":"Ⲗ","ⲙ":"Ⲙ","ⲛ":"Ⲛ","ⲝ":"Ⲝ","ⲟ":"Ⲟ","ⲡ":"Ⲡ","ⲣ":"Ⲣ","ⲥ":"Ⲥ","ⲧ":"Ⲧ","ⲩ":"Ⲩ","ⲫ":"Ⲫ","ⲭ":"Ⲭ","ⲯ":"Ⲯ","ⲱ":"Ⲱ","ⲳ":"Ⲳ","ⲵ":"Ⲵ","ⲷ":"Ⲷ","ⲹ":"Ⲹ","ⲻ":"Ⲻ","ⲽ":"Ⲽ","ⲿ":"Ⲿ","ⳁ":"Ⳁ","ⳃ":"Ⳃ","ⳅ":"Ⳅ","ⳇ":"Ⳇ","ⳉ":"Ⳉ","ⳋ":"Ⳋ","ⳍ":"Ⳍ","ⳏ":"Ⳏ","ⳑ":"Ⳑ","ⳓ":"Ⳓ","ⳕ":"Ⳕ","ⳗ":"Ⳗ","ⳙ":"Ⳙ","ⳛ":"Ⳛ","ⳝ":"Ⳝ","ⳟ":"Ⳟ","ⳡ":"Ⳡ","ⳣ":"Ⳣ","ⳬ":"Ⳬ","ⳮ":"Ⳮ","ⳳ":"Ⳳ","ꙁ":"Ꙁ","ꙃ":"Ꙃ","ꙅ":"Ꙅ","ꙇ":"Ꙇ","ꙉ":"Ꙉ","ꙋ":"Ꙋ","ꙍ":"Ꙍ","ꙏ":"Ꙏ","ꙑ":"Ꙑ","ꙓ":"Ꙓ","ꙕ":"Ꙕ","ꙗ":"Ꙗ","ꙙ":"Ꙙ","ꙛ":"Ꙛ","ꙝ":"Ꙝ","ꙟ":"Ꙟ","ꙡ":"Ꙡ","ꙣ":"Ꙣ","ꙥ":"Ꙥ","ꙧ":"Ꙧ","ꙩ":"Ꙩ","ꙫ":"Ꙫ","ꙭ":"Ꙭ","ꚁ":"Ꚁ","ꚃ":"Ꚃ","ꚅ":"Ꚅ","ꚇ":"Ꚇ","ꚉ":"Ꚉ","ꚋ":"Ꚋ","ꚍ":"Ꚍ","ꚏ":"Ꚏ","ꚑ":"Ꚑ","ꚓ":"Ꚓ","ꚕ":"Ꚕ","ꚗ":"Ꚗ","ꚙ":"Ꚙ","ꚛ":"Ꚛ","ꜣ":"Ꜣ","ꜥ":"Ꜥ","ꜧ":"Ꜧ","ꜩ":"Ꜩ","ꜫ":"Ꜫ","ꜭ":"Ꜭ","ꜯ":"Ꜯ","ꜳ":"Ꜳ","ꜵ":"Ꜵ","ꜷ":"Ꜷ","ꜹ":"Ꜹ","ꜻ":"Ꜻ","ꜽ":"Ꜽ","ꜿ":"Ꜿ","ꝁ":"Ꝁ","ꝃ":"Ꝃ","ꝅ":"Ꝅ","ꝇ":"Ꝇ","ꝉ":"Ꝉ","ꝋ":"Ꝋ","ꝍ":"Ꝍ","ꝏ":"Ꝏ","ꝑ":"Ꝑ","ꝓ":"Ꝓ","ꝕ":"Ꝕ","ꝗ":"Ꝗ","ꝙ":"Ꝙ","ꝛ":"Ꝛ","ꝝ":"Ꝝ","ꝟ":"Ꝟ","ꝡ":"Ꝡ","ꝣ":"Ꝣ","ꝥ":"Ꝥ","ꝧ":"Ꝧ","ꝩ":"Ꝩ","ꝫ":"Ꝫ","ꝭ":"Ꝭ","ꝯ":"Ꝯ","ꝺ":"Ꝺ","ꝼ":"Ꝼ","ᵹ":"Ᵹ","ꝿ":"Ꝿ","ꞁ":"Ꞁ","ꞃ":"Ꞃ","ꞅ":"Ꞅ","ꞇ":"Ꞇ","ꞌ":"Ꞌ","ɥ":"Ɥ","ꞑ":"Ꞑ","ꞓ":"Ꞓ","ꞗ":"Ꞗ","ꞙ":"Ꞙ","ꞛ":"Ꞛ","ꞝ":"Ꞝ","ꞟ":"Ꞟ","ꞡ":"Ꞡ","ꞣ":"Ꞣ","ꞥ":"Ꞥ","ꞧ":"Ꞧ","ꞩ":"Ꞩ","ɦ":"Ɦ","ɜ":"Ɜ","ɡ":"Ɡ","ɬ":"Ɬ","ɪ":"Ɪ","ʞ":"Ʞ","ʇ":"Ʇ","ʝ":"Ʝ","ꭓ":"Ꭓ","ꞵ":"Ꞵ","ꞷ":"Ꞷ","ꞹ":"Ꞹ","ꞻ":"Ꞻ","ꞽ":"Ꞽ","ꞿ":"Ꞿ","ꟁ":"Ꟁ","ꟃ":"Ꟃ","ꞔ":"Ꞔ","ʂ":"Ʂ","ᶎ":"Ᶎ","ꟈ":"Ꟈ","ꟊ":"Ꟊ","ɤ":"Ɤ","ꟍ":"Ꟍ","ꟑ":"Ꟑ","ꟗ":"Ꟗ","ꟙ":"Ꟙ","ꟛ":"Ꟛ","ƛ":"Ƛ","ꟶ":"Ꟶ","a":"A","b":"B","c":"C","d":"D","e":"E","f":"F","g":"G","h":"H","i":"I","j":"J","k":"K","l":"L","m":"M","n":"N","o":"O","p":"P","q":"Q","r":"R","s":"S","t":"T","u":"U","v":"V","w":"W","x":"X","y":"Y","z":"Z","𐐨":"𐐀","𐐩":"𐐁","𐐪":"𐐂","𐐫":"𐐃","𐐬":"𐐄","𐐭":"𐐅","𐐮":"𐐆","𐐯":"𐐇","𐐰":"𐐈","𐐱":"𐐉","𐐲":"𐐊","𐐳":"𐐋","𐐴":"𐐌","𐐵":"𐐍","𐐶":"𐐎","𐐷":"𐐏","𐐸":"𐐐","𐐹":"𐐑","𐐺":"𐐒","𐐻":"𐐓","𐐼":"𐐔","𐐽":"𐐕","𐐾":"𐐖","𐐿":"𐐗","𐑀":"𐐘","𐑁":"𐐙","𐑂":"𐐚","𐑃":"𐐛","𐑄":"𐐜","𐑅":"𐐝","𐑆":"𐐞","𐑇":"𐐟","𐑈":"𐐠","𐑉":"𐐡","𐑊":"𐐢","𐑋":"𐐣","𐑌":"𐐤","𐑍":"𐐥","𐑎":"𐐦","𐑏":"𐐧","𐓘":"𐒰","𐓙":"𐒱","𐓚":"𐒲","𐓛":"𐒳","𐓜":"𐒴","𐓝":"𐒵","𐓞":"𐒶","𐓟":"𐒷","𐓠":"𐒸","𐓡":"𐒹","𐓢":"𐒺","𐓣":"𐒻","𐓤":"𐒼","𐓥":"𐒽","𐓦":"𐒾","𐓧":"𐒿","𐓨":"𐓀","𐓩":"𐓁","𐓪":"𐓂","𐓫":"𐓃","𐓬":"𐓄","𐓭":"𐓅","𐓮":"𐓆","𐓯":"𐓇","𐓰":"𐓈","𐓱":"𐓉","𐓲":"𐓊","𐓳":"𐓋","𐓴":"𐓌","𐓵":"𐓍","𐓶":"𐓎","𐓷":"𐓏","𐓸":"𐓐","𐓹":"𐓑","𐓺":"𐓒","𐓻":"𐓓","𐖗":"𐕰","𐖘":"𐕱","𐖙":"𐕲","𐖚":"𐕳","𐖛":"𐕴","𐖜":"𐕵","𐖝":"𐕶","𐖞":"𐕷","𐖟":"𐕸","𐖠":"𐕹","𐖡":"𐕺","𐖣":"𐕼","𐖤":"𐕽","𐖥":"𐕾","𐖦":"𐕿","𐖧":"𐖀","𐖨":"𐖁","𐖩":"𐖂","𐖪":"𐖃","𐖫":"𐖄","𐖬":"𐖅","𐖭":"𐖆","𐖮":"𐖇","𐖯":"𐖈","𐖰":"𐖉","𐖱":"𐖊","𐖳":"𐖌","𐖴":"𐖍","𐖵":"𐖎","𐖶":"𐖏","𐖷":"𐖐","𐖸":"𐖑","𐖹":"𐖒","𐖻":"𐖔","𐖼":"𐖕","𐳀":"𐲀","𐳁":"𐲁","𐳂":"𐲂","𐳃":"𐲃","𐳄":"𐲄","𐳅":"𐲅","𐳆":"𐲆","𐳇":"𐲇","𐳈":"𐲈","𐳉":"𐲉","𐳊":"𐲊","𐳋":"𐲋","𐳌":"𐲌","𐳍":"𐲍","𐳎":"𐲎","𐳏":"𐲏","𐳐":"𐲐","𐳑":"𐲑","𐳒":"𐲒","𐳓":"𐲓","𐳔":"𐲔","𐳕":"𐲕","𐳖":"𐲖","𐳗":"𐲗","𐳘":"𐲘","𐳙":"𐲙","𐳚":"𐲚","𐳛":"𐲛","𐳜":"𐲜","𐳝":"𐲝","𐳞":"𐲞","𐳟":"𐲟","𐳠":"𐲠","𐳡":"𐲡","𐳢":"𐲢","𐳣":"𐲣","𐳤":"𐲤","𐳥":"𐲥","𐳦":"𐲦","𐳧":"𐲧","𐳨":"𐲨","𐳩":"𐲩","𐳪":"𐲪","𐳫":"𐲫","𐳬":"𐲬","𐳭":"𐲭","𐳮":"𐲮","𐳯":"𐲯","𐳰":"𐲰","𐳱":"𐲱","𐳲":"𐲲","𐵰":"𐵐","𐵱":"𐵑","𐵲":"𐵒","𐵳":"𐵓","𐵴":"𐵔","𐵵":"𐵕","𐵶":"𐵖","𐵷":"𐵗","𐵸":"𐵘","𐵹":"𐵙","𐵺":"𐵚","𐵻":"𐵛","𐵼":"𐵜","𐵽":"𐵝","𐵾":"𐵞","𐵿":"𐵟","𐶀":"𐵠","𐶁":"𐵡","𐶂":"𐵢","𐶃":"𐵣","𐶄":"𐵤","𐶅":"𐵥","𑣀":"𑢠","𑣁":"𑢡","𑣂":"𑢢","𑣃":"𑢣","𑣄":"𑢤","𑣅":"𑢥","𑣆":"𑢦","𑣇":"𑢧","𑣈":"𑢨","𑣉":"𑢩","𑣊":"𑢪","𑣋":"𑢫","𑣌":"𑢬","𑣍":"𑢭","𑣎":"𑢮","𑣏":"𑢯","𑣐":"𑢰","𑣑":"𑢱","𑣒":"𑢲","𑣓":"𑢳","𑣔":"𑢴","𑣕":"𑢵","𑣖":"𑢶","𑣗":"𑢷","𑣘":"𑢸","𑣙":"𑢹","𑣚":"𑢺","𑣛":"𑢻","𑣜":"𑢼","𑣝":"𑢽","𑣞":"𑢾","𑣟":"𑢿","𖹠":"𖹀","𖹡":"𖹁","𖹢":"𖹂","𖹣":"𖹃","𖹤":"𖹄","𖹥":"𖹅","𖹦":"𖹆","𖹧":"𖹇","𖹨":"𖹈","𖹩":"𖹉","𖹪":"𖹊","𖹫":"𖹋","𖹬":"𖹌","𖹭":"𖹍","𖹮":"𖹎","𖹯":"𖹏","𖹰":"𖹐","𖹱":"𖹑","𖹲":"𖹒","𖹳":"𖹓","𖹴":"𖹔","𖹵":"𖹕","𖹶":"𖹖","𖹷":"𖹗","𖹸":"𖹘","𖹹":"𖹙","𖹺":"𖹚","𖹻":"𖹛","𖹼":"𖹜","𖹽":"𖹝","𖹾":"𖹞","𖹿":"𖹟","𞤢":"𞤀","𞤣":"𞤁","𞤤":"𞤂","𞤥":"𞤃","𞤦":"𞤄","𞤧":"𞤅","𞤨":"𞤆","𞤩":"𞤇","𞤪":"𞤈","𞤫":"𞤉","𞤬":"𞤊","𞤭":"𞤋","𞤮":"𞤌","𞤯":"𞤍","𞤰":"𞤎","𞤱":"𞤏","𞤲":"𞤐","𞤳":"𞤑","𞤴":"𞤒","𞤵":"𞤓","𞤶":"𞤔","𞤷":"𞤕","𞤸":"𞤖","𞤹":"𞤗","𞤺":"𞤘","𞤻":"𞤙","𞤼":"𞤚","𞤽":"𞤛","𞤾":"𞤜","𞤿":"𞤝","𞥀":"𞤞","𞥁":"𞤟","𞥂":"𞤠","𞥃":"𞤡"} diff --git a/modules/bs.string/data/bs.string/function/insert/insert.mcfunction b/modules/bs.string/data/bs.string/function/insert/insert.mcfunction new file mode 100644 index 000000000..e5e61acc2 --- /dev/null +++ b/modules/bs.string/data/bs.string/function/insert/insert.mcfunction @@ -0,0 +1,22 @@ +# ------------------------------------------------------------------------------------------------------------ +# Copyright (c) 2025 Gunivers +# +# This file is part of the Bookshelf project (https://github.com/mcbookshelf/Bookshelf). +# +# This source code is subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Conditions: +# - You may use this file in compliance with the MPL v2.0 +# - Any modifications must be documented and disclosed under the same license +# +# For more details, refer to the MPL v2.0. +# ------------------------------------------------------------------------------------------------------------ + +$data modify storage bs:ctx _.s.3 set string storage bs:in string.insert.str 0 $(index) +data modify storage bs:ctx _.s.2 set string storage bs:in string.insert.needle +$data modify storage bs:ctx _.s.1 set string storage bs:in string.insert.str $(index) + +function bs.string:concat/combine/2c with storage bs:ctx _.s + +data modify storage bs:out string.insert set from storage bs:ctx _.s.1 diff --git a/modules/bs.string/data/bs.string/function/lower/loop.mcfunction b/modules/bs.string/data/bs.string/function/lower/loop.mcfunction new file mode 100644 index 000000000..c9bc073c2 --- /dev/null +++ b/modules/bs.string/data/bs.string/function/lower/loop.mcfunction @@ -0,0 +1,26 @@ +# ------------------------------------------------------------------------------------------------------------ +# Copyright (c) 2025 Gunivers +# +# This file is part of the Bookshelf project (https://github.com/mcbookshelf/Bookshelf). +# +# This source code is subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Conditions: +# - You may use this file in compliance with the MPL v2.0 +# - Any modifications must be documented and disclosed under the same license +# +# For more details, refer to the MPL v2.0. +# ------------------------------------------------------------------------------------------------------------ + +data remove storage bs:ctx _.lt +$data modify storage bs:ctx _.lt set from storage bs:const string.char_map.lower."$(ch)" +data modify storage bs:ctx _.list append from storage bs:ctx _.lt +execute unless data storage bs:ctx _.lt run data modify storage bs:ctx _.list append from storage bs:ctx _.ch + +#loop +execute if score #c bs.ctx matches 1 run return 0 +scoreboard players remove #c bs.ctx 1 +data modify storage bs:ctx _.st set string storage bs:ctx _.st 1 +data modify storage bs:ctx _.ch set string storage bs:ctx _.st 0 1 +function bs.string:lower/loop with storage bs:ctx _ diff --git a/modules/bs.string/data/bs.string/function/lower/lower.mcfunction b/modules/bs.string/data/bs.string/function/lower/lower.mcfunction new file mode 100644 index 000000000..3da7a3edb --- /dev/null +++ b/modules/bs.string/data/bs.string/function/lower/lower.mcfunction @@ -0,0 +1,27 @@ +# ------------------------------------------------------------------------------------------------------------ +# Copyright (c) 2025 Gunivers +# +# This file is part of the Bookshelf project (https://github.com/mcbookshelf/Bookshelf). +# +# This source code is subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Conditions: +# - You may use this file in compliance with the MPL v2.0 +# - Any modifications must be documented and disclosed under the same license +# +# For more details, refer to the MPL v2.0. +# ------------------------------------------------------------------------------------------------------------ +#setup +data modify storage bs:ctx _.st set from storage bs:in string.lower.str +execute store result score #c bs.ctx store result score #n bs.ctx run data get storage bs:in string.lower.str +data modify storage bs:ctx _.ch set string storage bs:ctx _.st 0 1 +data remove storage bs:ctx _.list + +#loop +function bs.string:lower/loop with storage bs:ctx _ + +#concat +function bs.string:concat/run + +data modify storage bs:out string.lower set from storage bs:ctx _.s.1 diff --git a/modules/bs.string/data/bs.string/function/replace/cut.mcfunction b/modules/bs.string/data/bs.string/function/replace/cut.mcfunction new file mode 100644 index 000000000..25f22436d --- /dev/null +++ b/modules/bs.string/data/bs.string/function/replace/cut.mcfunction @@ -0,0 +1,25 @@ +# ------------------------------------------------------------------------------------------------------------ +# Copyright (c) 2025 Gunivers +# +# This file is part of the Bookshelf project (https://github.com/mcbookshelf/Bookshelf). +# +# This source code is subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Conditions: +# - You may use this file in compliance with the MPL v2.0 +# - Any modifications must be documented and disclosed under the same license +# +# For more details, refer to the MPL v2.0. +# ------------------------------------------------------------------------------------------------------------ + +$data modify storage bs:ctx _.list append string storage bs:ctx _.rep 0 $(x) +data modify storage bs:ctx _.list append from storage bs:in string.replace.new +$data modify storage bs:ctx _.str set string storage bs:ctx _.str $(y) +$scoreboard players add #i bs.ctx $(y) +data modify storage bs:ctx _.rep set from storage bs:ctx _.str + +execute if score #l bs.ctx <= #i bs.ctx run return run data modify storage bs:ctx _.list append from storage bs:ctx _.rep + +scoreboard players set #d bs.ctx -1 +function bs.string:replace/loop with storage bs:ctx diff --git a/modules/bs.string/data/bs.string/function/replace/loop.mcfunction b/modules/bs.string/data/bs.string/function/replace/loop.mcfunction new file mode 100644 index 000000000..2ad7eb6e3 --- /dev/null +++ b/modules/bs.string/data/bs.string/function/replace/loop.mcfunction @@ -0,0 +1,26 @@ +# ------------------------------------------------------------------------------------------------------------ +# Copyright (c) 2025 Gunivers +# +# This file is part of the Bookshelf project (https://github.com/mcbookshelf/Bookshelf). +# +# This source code is subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Conditions: +# - You may use this file in compliance with the MPL v2.0 +# - Any modifications must be documented and disclosed under the same license +# +# For more details, refer to the MPL v2.0. +# ------------------------------------------------------------------------------------------------------------ + +execute store result storage bs:ctx x int 1 run scoreboard players add #d bs.ctx 1 + +$data modify storage bs:ctx _.test set string storage bs:ctx _.str 0 $(y) +data modify storage bs:ctx _.ltr set string storage bs:ctx _.test -1 +execute store success score #t bs.ctx run data modify storage bs:ctx _.test set from storage bs:in string.replace.old + +data modify storage bs:ctx z set from storage bs:ctx y +execute if score #t bs.ctx matches 0 run return run function bs.string:replace/cut with storage bs:ctx + +function bs.string:find/match_patern with storage bs:ctx _ +function bs.string:replace/skip with storage bs:ctx diff --git a/modules/bs.string/data/bs.string/function/replace/precompute.mcfunction b/modules/bs.string/data/bs.string/function/replace/precompute.mcfunction new file mode 100644 index 000000000..d180a708a --- /dev/null +++ b/modules/bs.string/data/bs.string/function/replace/precompute.mcfunction @@ -0,0 +1,21 @@ +# ------------------------------------------------------------------------------------------------------------ +# Copyright (c) 2025 Gunivers +# +# This file is part of the Bookshelf project (https://github.com/mcbookshelf/Bookshelf). +# +# This source code is subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Conditions: +# - You may use this file in compliance with the MPL v2.0 +# - Any modifications must be documented and disclosed under the same license +# +# For more details, refer to the MPL v2.0. +# ------------------------------------------------------------------------------------------------------------ +execute if score #e bs.ctx matches 1 run return 1 +execute store result storage bs:ctx z int 1 run scoreboard players remove #e bs.ctx 1 +$data modify storage bs:ctx _.patern."$(ltr)" set from storage bs:ctx z + +data modify storage bs:ctx _.ltr set string storage bs:ctx _.old 0 1 +data modify storage bs:ctx _.old set string storage bs:ctx _.old 1 +function bs.string:replace/precompute with storage bs:ctx _ diff --git a/modules/bs.string/data/bs.string/function/replace/replace.mcfunction b/modules/bs.string/data/bs.string/function/replace/replace.mcfunction new file mode 100644 index 000000000..7c9d71e2c --- /dev/null +++ b/modules/bs.string/data/bs.string/function/replace/replace.mcfunction @@ -0,0 +1,46 @@ +# ------------------------------------------------------------------------------------------------------------ +# Copyright (c) 2025 Gunivers +# +# This file is part of the Bookshelf project (https://github.com/mcbookshelf/Bookshelf). +# +# This source code is subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Conditions: +# - You may use this file in compliance with the MPL v2.0 +# - Any modifications must be documented and disclosed under the same license +# +# For more details, refer to the MPL v2.0. +# ------------------------------------------------------------------------------------------------------------ + +#reset +data modify storage bs:ctx _.l set value [] +execute store result score #c bs.ctx store result storage bs:ctx x int 1 run scoreboard players set #i bs.ctx 0 +scoreboard players set #d bs.ctx -1 + +#size check +execute store result score #l bs.ctx run data get storage bs:in string.replace.str +execute store result score #p bs.ctx store result score #e bs.ctx store result storage bs:ctx y int 1 run data get storage bs:in string.replace.old + +#moving values +data modify storage bs:ctx _ set from storage bs:in string.replace +data modify storage bs:ctx _.rep set from storage bs:in string.replace.str + +#corner case +execute if score #l bs.ctx matches 0 run return run data modify storage bs:out string.replace set value "" +execute if score #p bs.ctx matches 0 run return run data modify storage bs:out string.replace set from storage bs:in string.replace.str + +execute if score #p bs.ctx > #l bs.ctx run return 0 +scoreboard players operation #l bs.ctx -= #p bs.ctx + +#precompute +data modify storage bs:ctx _.ltr set string storage bs:ctx _.old 0 1 +data modify storage bs:ctx _.old set string storage bs:ctx _.old 1 +data remove storage bs:ctx _.patern +function bs.string:replace/precompute with storage bs:ctx _ + +function bs.string:replace/loop with storage bs:ctx + +function bs.string:concat/run + +data modify storage bs:out string.replace set from storage bs:ctx _.s.1 diff --git a/modules/bs.string/data/bs.string/function/replace/skip.mcfunction b/modules/bs.string/data/bs.string/function/replace/skip.mcfunction new file mode 100644 index 000000000..13c622062 --- /dev/null +++ b/modules/bs.string/data/bs.string/function/replace/skip.mcfunction @@ -0,0 +1,24 @@ +# ------------------------------------------------------------------------------------------------------------ +# Copyright (c) 2025 Gunivers +# +# This file is part of the Bookshelf project (https://github.com/mcbookshelf/Bookshelf). +# +# This source code is subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Conditions: +# - You may use this file in compliance with the MPL v2.0 +# - Any modifications must be documented and disclosed under the same license +# +# For more details, refer to the MPL v2.0. +# ------------------------------------------------------------------------------------------------------------ + +$scoreboard players add #i bs.ctx $(z) +$scoreboard players add #d bs.ctx $(z) +scoreboard players remove #d bs.ctx 1 + +execute if score #l bs.ctx < #i bs.ctx run return run data modify storage bs:ctx _.list append from storage bs:ctx _.rep + +$data modify storage bs:ctx _.str set string storage bs:ctx _.str $(z) + +function bs.string:replace/loop with storage bs:ctx diff --git a/modules/bs.string/data/bs.string/function/reversed/loop.mcfunction b/modules/bs.string/data/bs.string/function/reversed/loop.mcfunction new file mode 100644 index 000000000..155a7ea39 --- /dev/null +++ b/modules/bs.string/data/bs.string/function/reversed/loop.mcfunction @@ -0,0 +1,20 @@ +# ------------------------------------------------------------------------------------------------------------ +# Copyright (c) 2025 Gunivers +# +# This file is part of the Bookshelf project (https://github.com/mcbookshelf/Bookshelf). +# +# This source code is subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Conditions: +# - You may use this file in compliance with the MPL v2.0 +# - Any modifications must be documented and disclosed under the same license +# +# For more details, refer to the MPL v2.0. +# ------------------------------------------------------------------------------------------------------------ + +data modify storage bs:ctx _.list append string storage bs:ctx _.str -1 +data modify storage bs:ctx _.str set string storage bs:ctx _.str 0 -1 +execute if score #i bs.ctx >= #l bs.ctx run return 0 +scoreboard players add #i bs.ctx 1 +function bs.string:reversed/loop diff --git a/modules/bs.string/data/bs.string/function/reversed/reversed.mcfunction b/modules/bs.string/data/bs.string/function/reversed/reversed.mcfunction new file mode 100644 index 000000000..87bd2710a --- /dev/null +++ b/modules/bs.string/data/bs.string/function/reversed/reversed.mcfunction @@ -0,0 +1,28 @@ +# ------------------------------------------------------------------------------------------------------------ +# Copyright (c) 2025 Gunivers +# +# This file is part of the Bookshelf project (https://github.com/mcbookshelf/Bookshelf). +# +# This source code is subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Conditions: +# - You may use this file in compliance with the MPL v2.0 +# - Any modifications must be documented and disclosed under the same license +# +# For more details, refer to the MPL v2.0. +# ------------------------------------------------------------------------------------------------------------ + +data modify storage bs:ctx _.str set from storage bs:in string.reversed.str +scoreboard players set #i bs.ctx 0 +execute store result score #l bs.ctx run data get storage bs:in string.reversed.str + +execute if score #l bs.ctx matches ..1 run return run data modify storage bs:out string.reversed set from storage bs:in string.reversed.str + +function bs.string:reversed/loop + +function bs.string:concat/run + +data modify storage bs:out string.reversed set from storage bs:ctx _.s.1 + +return run scoreboard players get #l bs.ctx diff --git a/modules/bs.string/data/bs.string/function/split/count/count.mcfunction b/modules/bs.string/data/bs.string/function/split/count/count.mcfunction new file mode 100644 index 000000000..1fa00b73f --- /dev/null +++ b/modules/bs.string/data/bs.string/function/split/count/count.mcfunction @@ -0,0 +1,29 @@ +# ------------------------------------------------------------------------------------------------------------ +# Copyright (c) 2025 Gunivers +# +# This file is part of the Bookshelf project (https://github.com/mcbookshelf/Bookshelf). +# +# This source code is subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Conditions: +# - You may use this file in compliance with the MPL v2.0 +# - Any modifications must be documented and disclosed under the same license +# +# For more details, refer to the MPL v2.0. +# ------------------------------------------------------------------------------------------------------------ + + +execute store result storage bs:ctx x int 1 run scoreboard players add #d bs.ctx 1 + +$data modify storage bs:ctx _.test set string storage bs:ctx _.str 0 $(y) +data modify storage bs:ctx _.ltr set string storage bs:ctx _.test -1 +execute store success score #t bs.ctx run data modify storage bs:ctx _.test set from storage bs:in string.split.separator + +data modify storage bs:ctx z set from storage bs:ctx y +execute if score #t bs.ctx matches 0 run return run function bs.string:split/count/cut with storage bs:ctx + + +function bs.string:find/match_patern with storage bs:ctx _ + +function bs.string:split/count/skip with storage bs:ctx diff --git a/modules/bs.string/data/bs.string/function/split/count/cut.mcfunction b/modules/bs.string/data/bs.string/function/split/count/cut.mcfunction new file mode 100644 index 000000000..e4fffecee --- /dev/null +++ b/modules/bs.string/data/bs.string/function/split/count/cut.mcfunction @@ -0,0 +1,28 @@ +# ------------------------------------------------------------------------------------------------------------ +# Copyright (c) 2025 Gunivers +# +# This file is part of the Bookshelf project (https://github.com/mcbookshelf/Bookshelf). +# +# This source code is subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Conditions: +# - You may use this file in compliance with the MPL v2.0 +# - Any modifications must be documented and disclosed under the same license +# +# For more details, refer to the MPL v2.0. +# ------------------------------------------------------------------------------------------------------------ + +$data modify storage bs:out string.split append string storage bs:ctx _.cut 0 $(x) +$data modify storage bs:ctx _.str set string storage bs:ctx _.str $(y) +$scoreboard players add #i bs.ctx $(y) + +data modify storage bs:ctx _.cut set from storage bs:ctx _.str +execute if score #l bs.ctx <= #i bs.ctx run return run data modify storage bs:out string.split append from storage bs:ctx _.cut + +#count operations +scoreboard players add #c bs.ctx 1 +execute if score #c bs.ctx = #o bs.ctx run return run data modify storage bs:out string.split append from storage bs:ctx _.cut + +scoreboard players set #d bs.ctx -1 +function bs.string:split/count/count with storage bs:ctx diff --git a/modules/bs.string/data/bs.string/function/split/count/skip.mcfunction b/modules/bs.string/data/bs.string/function/split/count/skip.mcfunction new file mode 100644 index 000000000..92c2e068f --- /dev/null +++ b/modules/bs.string/data/bs.string/function/split/count/skip.mcfunction @@ -0,0 +1,24 @@ +# ------------------------------------------------------------------------------------------------------------ +# Copyright (c) 2025 Gunivers +# +# This file is part of the Bookshelf project (https://github.com/mcbookshelf/Bookshelf). +# +# This source code is subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Conditions: +# - You may use this file in compliance with the MPL v2.0 +# - Any modifications must be documented and disclosed under the same license +# +# For more details, refer to the MPL v2.0. +# ------------------------------------------------------------------------------------------------------------ + +$scoreboard players add #i bs.ctx $(z) +$scoreboard players add #d bs.ctx $(z) +scoreboard players remove #d bs.ctx 1 + +execute if score #l bs.ctx < #i bs.ctx run return run data modify storage bs:out string.split append from storage bs:ctx _.cut + +$data modify storage bs:ctx _.str set string storage bs:ctx _.str $(z) + +function bs.string:split/count/count with storage bs:ctx diff --git a/modules/bs.string/data/bs.string/function/split/normal/cut.mcfunction b/modules/bs.string/data/bs.string/function/split/normal/cut.mcfunction new file mode 100644 index 000000000..74f2cb5e1 --- /dev/null +++ b/modules/bs.string/data/bs.string/function/split/normal/cut.mcfunction @@ -0,0 +1,24 @@ +# ------------------------------------------------------------------------------------------------------------ +# Copyright (c) 2025 Gunivers +# +# This file is part of the Bookshelf project (https://github.com/mcbookshelf/Bookshelf). +# +# This source code is subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Conditions: +# - You may use this file in compliance with the MPL v2.0 +# - Any modifications must be documented and disclosed under the same license +# +# For more details, refer to the MPL v2.0. +# ------------------------------------------------------------------------------------------------------------ + +$data modify storage bs:out string.split append string storage bs:ctx _.cut 0 $(x) +$data modify storage bs:ctx _.str set string storage bs:ctx _.str $(y) +$scoreboard players add #i bs.ctx $(y) +data modify storage bs:ctx _.cut set from storage bs:ctx _.str + +execute if score #l bs.ctx < #i bs.ctx run return run data modify storage bs:out string.split append from storage bs:ctx _.cut + +scoreboard players set #d bs.ctx -1 +function bs.string:split/normal/normal with storage bs:ctx diff --git a/modules/bs.string/data/bs.string/function/split/normal/normal.mcfunction b/modules/bs.string/data/bs.string/function/split/normal/normal.mcfunction new file mode 100644 index 000000000..f3015196d --- /dev/null +++ b/modules/bs.string/data/bs.string/function/split/normal/normal.mcfunction @@ -0,0 +1,27 @@ +# ------------------------------------------------------------------------------------------------------------ +# Copyright (c) 2025 Gunivers +# +# This file is part of the Bookshelf project (https://github.com/mcbookshelf/Bookshelf). +# +# This source code is subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Conditions: +# - You may use this file in compliance with the MPL v2.0 +# - Any modifications must be documented and disclosed under the same license +# +# For more details, refer to the MPL v2.0. +# ------------------------------------------------------------------------------------------------------------ + + +execute store result storage bs:ctx x int 1 run scoreboard players add #d bs.ctx 1] + +$data modify storage bs:ctx _.test set string storage bs:ctx _.str 0 $(y) +data modify storage bs:ctx _.ltr set string storage bs:ctx _.test -1 +execute store success score #t bs.ctx run data modify storage bs:ctx _.test set from storage bs:in string.split.separator + +data modify storage bs:ctx z set from storage bs:ctx y +execute if score #t bs.ctx matches 0 run return run function bs.string:split/normal/cut with storage bs:ctx + +function bs.string:find/match_patern with storage bs:ctx _ +function bs.string:split/normal/skip with storage bs:ctx diff --git a/modules/bs.string/data/bs.string/function/split/normal/skip.mcfunction b/modules/bs.string/data/bs.string/function/split/normal/skip.mcfunction new file mode 100644 index 000000000..8aa263e82 --- /dev/null +++ b/modules/bs.string/data/bs.string/function/split/normal/skip.mcfunction @@ -0,0 +1,24 @@ +# ------------------------------------------------------------------------------------------------------------ +# Copyright (c) 2025 Gunivers +# +# This file is part of the Bookshelf project (https://github.com/mcbookshelf/Bookshelf). +# +# This source code is subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Conditions: +# - You may use this file in compliance with the MPL v2.0 +# - Any modifications must be documented and disclosed under the same license +# +# For more details, refer to the MPL v2.0. +# ------------------------------------------------------------------------------------------------------------ + +$scoreboard players add #i bs.ctx $(z) +$scoreboard players add #d bs.ctx $(z) +scoreboard players remove #d bs.ctx 1 + +execute if score #l bs.ctx < #i bs.ctx run return run data modify storage bs:out string.split append from storage bs:ctx _.cut + +$data modify storage bs:ctx _.str set string storage bs:ctx _.str $(z) + +function bs.string:split/normal/normal with storage bs:ctx diff --git a/modules/bs.string/data/bs.string/function/split/precompute.mcfunction b/modules/bs.string/data/bs.string/function/split/precompute.mcfunction new file mode 100644 index 000000000..8d289caf4 --- /dev/null +++ b/modules/bs.string/data/bs.string/function/split/precompute.mcfunction @@ -0,0 +1,21 @@ +# ------------------------------------------------------------------------------------------------------------ +# Copyright (c) 2025 Gunivers +# +# This file is part of the Bookshelf project (https://github.com/mcbookshelf/Bookshelf). +# +# This source code is subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Conditions: +# - You may use this file in compliance with the MPL v2.0 +# - Any modifications must be documented and disclosed under the same license +# +# For more details, refer to the MPL v2.0. +# ------------------------------------------------------------------------------------------------------------ +execute if score #e bs.ctx matches 1 run return 1 +execute store result storage bs:ctx z int 1 run scoreboard players remove #e bs.ctx 1 +$data modify storage bs:ctx _.patern."$(ltr)" set from storage bs:ctx z + +data modify storage bs:ctx _.ltr set string storage bs:ctx _.separator 0 1 +data modify storage bs:ctx _.separator set string storage bs:ctx _.separator 1 +function bs.string:split/precompute with storage bs:ctx _ diff --git a/modules/bs.string/data/bs.string/function/split/split.mcfunction b/modules/bs.string/data/bs.string/function/split/split.mcfunction new file mode 100644 index 000000000..5f8b02a41 --- /dev/null +++ b/modules/bs.string/data/bs.string/function/split/split.mcfunction @@ -0,0 +1,46 @@ +# ------------------------------------------------------------------------------------------------------------ +# Copyright (c) 2025 Gunivers +# +# This file is part of the Bookshelf project (https://github.com/mcbookshelf/Bookshelf). +# +# This source code is subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Conditions: +# - You may use this file in compliance with the MPL v2.0 +# - Any modifications must be documented and disclosed under the same license +# +# For more details, refer to the MPL v2.0. +# ------------------------------------------------------------------------------------------------------------ +$scoreboard players set #o bs.ctx $(maxsplit) +#reset +data modify storage bs:out string.split set value [] +execute store result score #c bs.ctx store result storage bs:ctx x int 1 run scoreboard players set #i bs.ctx 0 +scoreboard players set #d bs.ctx -1 + +#size check +execute store result score #l bs.ctx run data get storage bs:in string.split.str +execute store result score #p bs.ctx store result score #e bs.ctx store result storage bs:ctx y int 1 run data get storage bs:in string.split.separator + +#moving values +data modify storage bs:ctx _ set from storage bs:in string.split +data modify storage bs:ctx _.cut set from storage bs:in string.split.str + +#corner case +execute if score #l bs.ctx matches 0 run return run data modify storage bs:out string.split append value "" +execute if score #p bs.ctx matches 0 run function bs.string:type/to_list/run +execute if score #p bs.ctx matches 0 run return run data modify storage bs:out string.split set from storage bs:ctx _.l + +execute if score #p bs.ctx > #l bs.ctx run return 0 +scoreboard players operation #l bs.ctx -= #p bs.ctx + +#precompute +data modify storage bs:ctx _.ltr set string storage bs:ctx _.separator 0 1 +data modify storage bs:ctx _.separator set string storage bs:ctx _.separator 1 +data remove storage bs:ctx _.patern +function bs.string:split/precompute with storage bs:ctx _ + +#check values +execute if score #o bs.ctx matches 0 run return run function bs.string:split/normal/normal with storage bs:ctx +execute if score #o bs.ctx matches 1.. run return run function bs.string:split/count/count with storage bs:ctx +function #bs.log:error { namespace: "bs.string", path: "bs.string:split", tag: "split", message: '"does not accept negative values"' } diff --git a/modules/bs.string/data/bs.string/function/type/to_list/loop.mcfunction b/modules/bs.string/data/bs.string/function/type/to_list/loop.mcfunction new file mode 100644 index 000000000..790127696 --- /dev/null +++ b/modules/bs.string/data/bs.string/function/type/to_list/loop.mcfunction @@ -0,0 +1,20 @@ +# ------------------------------------------------------------------------------------------------------------ +# Copyright (c) 2025 Gunivers +# +# This file is part of the Bookshelf project (https://github.com/mcbookshelf/Bookshelf). +# +# This source code is subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Conditions: +# - You may use this file in compliance with the MPL v2.0 +# - Any modifications must be documented and disclosed under the same license +# +# For more details, refer to the MPL v2.0. +# ------------------------------------------------------------------------------------------------------------ + +data modify storage bs:ctx _.l append string storage bs:ctx _.str 0 1 +data modify storage bs:ctx _.str set string storage bs:ctx _.str 1 +execute if score #i bs.ctx >= #l bs.ctx run return 0 +scoreboard players add #i bs.ctx 1 +function bs.string:type/to_list/loop diff --git a/modules/bs.string/data/bs.string/function/type/to_list/run.mcfunction b/modules/bs.string/data/bs.string/function/type/to_list/run.mcfunction new file mode 100644 index 000000000..cce4bc9e5 --- /dev/null +++ b/modules/bs.string/data/bs.string/function/type/to_list/run.mcfunction @@ -0,0 +1,6 @@ +data remove storage bs:ctx _.l +data modify storage bs:out string.list set value [] +scoreboard players set #i bs.ctx 0 +execute store result score #l bs.ctx run data get storage bs:in string.to_list.str + +function bs.string:type/to_list/loop diff --git a/modules/bs.string/data/bs.string/function/type/to_list/to_list.mcfunction b/modules/bs.string/data/bs.string/function/type/to_list/to_list.mcfunction new file mode 100644 index 000000000..8675cdbd8 --- /dev/null +++ b/modules/bs.string/data/bs.string/function/type/to_list/to_list.mcfunction @@ -0,0 +1,21 @@ +# ------------------------------------------------------------------------------------------------------------ +# Copyright (c) 2025 Gunivers +# +# This file is part of the Bookshelf project (https://github.com/mcbookshelf/Bookshelf). +# +# This source code is subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Conditions: +# - You may use this file in compliance with the MPL v2.0 +# - Any modifications must be documented and disclosed under the same license +# +# For more details, refer to the MPL v2.0. +# ------------------------------------------------------------------------------------------------------------ + +data modify storage bs:ctx _.str set from storage bs:in string.to_list.str + +function bs.string:type/to_list/run + +data modify storage bs:out string.list append from storage bs:ctx _.l +return run scoreboard players get #l bs.ctx diff --git a/modules/bs.string/data/bs.string/function/type/to_number.mcfunction b/modules/bs.string/data/bs.string/function/type/to_number.mcfunction new file mode 100644 index 000000000..081d01f23 --- /dev/null +++ b/modules/bs.string/data/bs.string/function/type/to_number.mcfunction @@ -0,0 +1,16 @@ +# ------------------------------------------------------------------------------------------------------------ +# Copyright (c) 2025 Gunivers +# +# This file is part of the Bookshelf project (https://github.com/mcbookshelf/Bookshelf). +# +# This source code is subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Conditions: +# - You may use this file in compliance with the MPL v2.0 +# - Any modifications must be documented and disclosed under the same license +# +# For more details, refer to the MPL v2.0. +# ------------------------------------------------------------------------------------------------------------ + +$data modify storage bs:out string.to_number set value $(str) diff --git a/modules/bs.string/data/bs.string/function/type/to_string.mcfunction b/modules/bs.string/data/bs.string/function/type/to_string.mcfunction new file mode 100644 index 000000000..161adb328 --- /dev/null +++ b/modules/bs.string/data/bs.string/function/type/to_string.mcfunction @@ -0,0 +1,16 @@ +# ------------------------------------------------------------------------------------------------------------ +# Copyright (c) 2025 Gunivers +# +# This file is part of the Bookshelf project (https://github.com/mcbookshelf/Bookshelf). +# +# This source code is subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Conditions: +# - You may use this file in compliance with the MPL v2.0 +# - Any modifications must be documented and disclosed under the same license +# +# For more details, refer to the MPL v2.0. +# ------------------------------------------------------------------------------------------------------------ + +$data modify storage bs:out string.to_string set value "$(num)" diff --git a/modules/bs.string/data/bs.string/function/upper/loop.mcfunction b/modules/bs.string/data/bs.string/function/upper/loop.mcfunction new file mode 100644 index 000000000..5faf9a8bf --- /dev/null +++ b/modules/bs.string/data/bs.string/function/upper/loop.mcfunction @@ -0,0 +1,26 @@ +# ------------------------------------------------------------------------------------------------------------ +# Copyright (c) 2025 Gunivers +# +# This file is part of the Bookshelf project (https://github.com/mcbookshelf/Bookshelf). +# +# This source code is subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Conditions: +# - You may use this file in compliance with the MPL v2.0 +# - Any modifications must be documented and disclosed under the same license +# +# For more details, refer to the MPL v2.0. +# ------------------------------------------------------------------------------------------------------------ + +data remove storage bs:ctx _.lt +$data modify storage bs:ctx _.lt set from storage bs:const string.char_map.upper."$(ch)" +data modify storage bs:ctx _.list append from storage bs:ctx _.lt +execute unless data storage bs:ctx _.lt run data modify storage bs:ctx _.list append from storage bs:ctx _.ch + +#loop +execute if score #c bs.ctx matches 1 run return 0 +scoreboard players remove #c bs.ctx 1 +data modify storage bs:ctx _.st set string storage bs:ctx _.st 1 +data modify storage bs:ctx _.ch set string storage bs:ctx _.st 0 1 +function bs.string:upper/loop with storage bs:ctx _ diff --git a/modules/bs.string/data/bs.string/function/upper/upper.mcfunction b/modules/bs.string/data/bs.string/function/upper/upper.mcfunction new file mode 100644 index 000000000..759f5f2c7 --- /dev/null +++ b/modules/bs.string/data/bs.string/function/upper/upper.mcfunction @@ -0,0 +1,25 @@ +# ------------------------------------------------------------------------------------------------------------ +# Copyright (c) 2025 Gunivers +# +# This file is part of the Bookshelf project (https://github.com/mcbookshelf/Bookshelf). +# +# This source code is subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Conditions: +# - You may use this file in compliance with the MPL v2.0 +# - Any modifications must be documented and disclosed under the same license +# +# For more details, refer to the MPL v2.0. +# ------------------------------------------------------------------------------------------------------------ +#setup +data modify storage bs:ctx _.st set from storage bs:in string.upper.str +execute store result score #c bs.ctx store result score #n bs.ctx run data get storage bs:in string.upper.str +data modify storage bs:ctx _.ch set string storage bs:ctx _.st 0 1 +data remove storage bs:ctx _.list + +function bs.string:upper/loop with storage bs:ctx _ + +function bs.string:concat/run + +data modify storage bs:out string.upper set from storage bs:ctx _.s.1 diff --git a/modules/bs.string/data/bs.string/tags/function/concat.json b/modules/bs.string/data/bs.string/tags/function/concat.json new file mode 100644 index 000000000..7056ba45e --- /dev/null +++ b/modules/bs.string/data/bs.string/tags/function/concat.json @@ -0,0 +1,20 @@ +{ + "__bookshelf__": { + "feature": true, + "documentation": "https://docs.mcbookshelf.dev/en/latest/modules/string.html#concat", + "authors": [ + "aure31" + ], + "created": { + "date": "2025/01/10", + "minecraft_version": "1.21.4" + }, + "updated": { + "date": "2025/01/13", + "minecraft_version": "1.21.4" + } + }, + "values": [ + "bs.string:concat/concat" + ] +} diff --git a/modules/bs.string/data/bs.string/tags/function/find.json b/modules/bs.string/data/bs.string/tags/function/find.json new file mode 100644 index 000000000..6c257481b --- /dev/null +++ b/modules/bs.string/data/bs.string/tags/function/find.json @@ -0,0 +1,20 @@ +{ + "__bookshelf__": { + "feature": true, + "documentation": "https://docs.mcbookshelf.dev/en/latest/modules/string.html#find", + "authors": [ + "aure31" + ], + "created": { + "date": "2025/01/12", + "minecraft_version": "1.21.4" + }, + "updated": { + "date": "2025/01/15", + "minecraft_version": "1.21.4" + } + }, + "values": [ + "bs.string:find/find" + ] +} diff --git a/modules/bs.string/data/bs.string/tags/function/insert.json b/modules/bs.string/data/bs.string/tags/function/insert.json new file mode 100644 index 000000000..0196ad215 --- /dev/null +++ b/modules/bs.string/data/bs.string/tags/function/insert.json @@ -0,0 +1,20 @@ +{ + "__bookshelf__": { + "feature": true, + "documentation": "https://docs.mcbookshelf.dev/en/latest/modules/string.html#find", + "authors": [ + "aure31" + ], + "created": { + "date": "2025/01/25", + "minecraft_version": "1.21.4" + }, + "updated": { + "date": "2025/01/25", + "minecraft_version": "1.21.4" + } + }, + "values": [ + "bs.string:insert/insert" + ] +} diff --git a/modules/bs.string/data/bs.string/tags/function/lower.json b/modules/bs.string/data/bs.string/tags/function/lower.json new file mode 100644 index 000000000..d0d515c89 --- /dev/null +++ b/modules/bs.string/data/bs.string/tags/function/lower.json @@ -0,0 +1,20 @@ +{ + "__bookshelf__": { + "feature": true, + "documentation": "https://docs.mcbookshelf.dev/en/latest/modules/string.html#case", + "authors": [ + "aure31" + ], + "created": { + "date": "2025/01/11", + "minecraft_version": "1.21.4" + }, + "updated": { + "date": "2025/01/13", + "minecraft_version": "1.21.4" + } + }, + "values": [ + "bs.string:lower/lower" + ] +} diff --git a/modules/bs.string/data/bs.string/tags/function/replace.json b/modules/bs.string/data/bs.string/tags/function/replace.json new file mode 100644 index 000000000..157284ce9 --- /dev/null +++ b/modules/bs.string/data/bs.string/tags/function/replace.json @@ -0,0 +1,20 @@ +{ + "__bookshelf__": { + "feature": true, + "documentation": "https://docs.mcbookshelf.dev/en/latest/modules/string.html#replace", + "authors": [ + "aure31" + ], + "created": { + "date": "2025/01/15", + "minecraft_version": "1.21.4" + }, + "updated": { + "date": "2025/01/15", + "minecraft_version": "1.21.4" + } + }, + "values": [ + "bs.string:replace/replace" + ] +} diff --git a/modules/bs.string/data/bs.string/tags/function/reversed.json b/modules/bs.string/data/bs.string/tags/function/reversed.json new file mode 100644 index 000000000..1dec2a254 --- /dev/null +++ b/modules/bs.string/data/bs.string/tags/function/reversed.json @@ -0,0 +1,20 @@ +{ + "__bookshelf__": { + "feature": true, + "documentation": "https://docs.mcbookshelf.dev/en/latest/modules/string.html#concat", + "authors": [ + "aure31" + ], + "created": { + "date": "2025/03/1", + "minecraft_version": "1.21.4" + }, + "updated": { + "date": "2025/03/1", + "minecraft_version": "1.21.4" + } + }, + "values": [ + "bs.string:reversed/reversed" + ] +} diff --git a/modules/bs.string/data/bs.string/tags/function/split.json b/modules/bs.string/data/bs.string/tags/function/split.json new file mode 100644 index 000000000..f3b674dc0 --- /dev/null +++ b/modules/bs.string/data/bs.string/tags/function/split.json @@ -0,0 +1,20 @@ +{ + "__bookshelf__": { + "feature": true, + "documentation": "https://docs.mcbookshelf.dev/en/latest/modules/string.html#split", + "authors": [ + "aure31" + ], + "created": { + "date": "2025/01/15", + "minecraft_version": "1.21.4" + }, + "updated": { + "date": "2025/01/15", + "minecraft_version": "1.21.4" + } + }, + "values": [ + "bs.string:split/split" + ] +} diff --git a/modules/bs.string/data/bs.string/tags/function/to_list.json b/modules/bs.string/data/bs.string/tags/function/to_list.json new file mode 100644 index 000000000..4c8caf0c9 --- /dev/null +++ b/modules/bs.string/data/bs.string/tags/function/to_list.json @@ -0,0 +1,20 @@ +{ + "__bookshelf__": { + "feature": true, + "documentation": "https://docs.mcbookshelf.dev/en/latest/modules/string.html#to_list", + "authors": [ + "aure31" + ], + "created": { + "date": "2025/01/15", + "minecraft_version": "1.21.4" + }, + "updated": { + "date": "2025/01/15", + "minecraft_version": "1.21.4" + } + }, + "values": [ + "bs.string:type/to_list/to_list" + ] +} diff --git a/modules/bs.string/data/bs.string/tags/function/to_number.json b/modules/bs.string/data/bs.string/tags/function/to_number.json new file mode 100644 index 000000000..c4e4a51e1 --- /dev/null +++ b/modules/bs.string/data/bs.string/tags/function/to_number.json @@ -0,0 +1,20 @@ +{ + "__bookshelf__": { + "feature": true, + "documentation": "https://docs.mcbookshelf.dev/en/latest/modules/string.html#to_number", + "authors": [ + "aure31" + ], + "created": { + "date": "2025/01/11", + "minecraft_version": "1.21.4" + }, + "updated": { + "date": "2025/01/15", + "minecraft_version": "1.21.4" + } + }, + "values": [ + "bs.string:type/to_number" + ] +} diff --git a/modules/bs.string/data/bs.string/tags/function/to_string.json b/modules/bs.string/data/bs.string/tags/function/to_string.json new file mode 100644 index 000000000..35ac83dbf --- /dev/null +++ b/modules/bs.string/data/bs.string/tags/function/to_string.json @@ -0,0 +1,20 @@ +{ + "__bookshelf__": { + "feature": true, + "documentation": "https://docs.mcbookshelf.dev/en/latest/modules/string.html#to_string", + "authors": [ + "aure31" + ], + "created": { + "date": "2025/01/11", + "minecraft_version": "1.21.4" + }, + "updated": { + "date": "2025/01/15", + "minecraft_version": "1.21.4" + } + }, + "values": [ + "bs.string:type/to_string" + ] +} diff --git a/modules/bs.string/data/bs.string/tags/function/upper.json b/modules/bs.string/data/bs.string/tags/function/upper.json new file mode 100644 index 000000000..d4ad9d602 --- /dev/null +++ b/modules/bs.string/data/bs.string/tags/function/upper.json @@ -0,0 +1,20 @@ +{ + "__bookshelf__": { + "feature": true, + "documentation": "https://docs.mcbookshelf.dev/en/latest/modules/string.html#case", + "authors": [ + "aure31" + ], + "created": { + "date": "2025/01/11", + "minecraft_version": "1.21.4" + }, + "updated": { + "date": "2025/01/13", + "minecraft_version": "1.21.4" + } + }, + "values": [ + "bs.string:upper/upper" + ] +} diff --git a/modules/bs.string/data/bs.string/test/concat.mcfunction b/modules/bs.string/data/bs.string/test/concat.mcfunction new file mode 100644 index 000000000..155194ca7 --- /dev/null +++ b/modules/bs.string/data/bs.string/test/concat.mcfunction @@ -0,0 +1,32 @@ +# ------------------------------------------------------------------------------------------------------------ +# Copyright (c) 2025 Gunivers +# +# This file is part of the Bookshelf project (https://github.com/mcbookshelf/Bookshelf). +# +# This source code is subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Conditions: +# - You may use this file in compliance with the MPL v2.0 +# - Any modifications must be documented and disclosed under the same license +# +# For more details, refer to the MPL v2.0. +# ------------------------------------------------------------------------------------------------------------ +#first small test +data modify storage bs:in string.concat.list set value ['a','b','c','d','e','f','g','h','i','j','k','l','m'] +function #bs.string:concat +assert data storage bs:out {string:{concat:"abcdefghijklm"}} + +#second bigger test +data modify storage bs:in string.concat.list set value ['0,', '1,', '2,', '3,', '4,', '5,', '6,', '7,', '8,', '9,', '10,', '11,', '12,', '13,', '14,', '15,', '16,', '17,', '18,', '19,', '20,', '21,', '22,', '23,', '24,', '25,', '26,', '27,', '28,', '29,', '30,', '31,', '32,', '33,', '34,', '35,', '36,', '37,', '38,', '39,', '40,', '41,', '42,', '43,', '44,', '45,', '46,', '47,', '48,', '49,', '50,', '51,', '52,', '53,', '54,', '55,', '56,', '57,', '58,', '59,', '60,', '61,', '62,', '63,', '64,', '65,', '66,', '67,', '68,', '69,', '70,', '71,', '72,', '73,', '74,', '75,', '76,', '77,', '78,', '79,', '80,', '81,', '82,', '83,', '84,', '85,', '86,', '87,', '88,', '89,', '90,', '91,', '92,', '93,', '94,', '95,', '96,', '97,', '98,', '99,', '100,', '101,', '102,', '103,', '104,', '105,', '106,', '107,', '108,', '109,', '110,', '111,', '112,', '113,', '114,', '115,', '116,', '117,', '118,', '119,', '120,', '121,', '122,', '123,', '124,', '125,', '126,', '127,', '128,', '129,', '130,', '131,', '132,', '133,', '134,', '135,', '136,', '137,', '138,', '139,', '140,', '141,', '142,', '143,', '144,', '145,', '146,', '147,', '148,', '149,', '150,', '151,', '152,', '153,', '154,', '155,', '156,', '157,', '158,', '159,', '160,', '161,', '162,', '163,', '164,', '165,', '166,', '167,', '168,', '169,', '170,', '171,', '172,', '173,', '174,', '175,', '176,', '177,', '178,', '179,', '180,', '181,', '182,', '183,', '184,', '185,', '186,', '187,', '188,', '189,', '190,', '191,', '192,', '193,', '194,', '195,', '196,', '197,', '198,', '199,', '200,', '201,', '202,', '203,', '204,', '205,', '206,', '207,', '208,', '209,', '210,', '211,', '212,', '213,', '214,', '215,', '216,', '217,', '218,', '219,', '220,', '221,', '222,', '223,', '224,', '225,', '226,', '227,', '228,', '229,', '230,', '231,', '232,', '233,', '234,', '235,', '236,', '237,', '238,', '239,', '240,', '241,', '242,', '243,', '244,', '245,', '246,', '247,', '248,', '249,', '250,', '251,', '252,', '253,', '254,', '255,', '256,', '257,', '258,', '259,', '260,', '261,', '262,', '263,', '264,', '265,', '266,', '267,', '268,', '269,', '270,', '271,', '272,', '273,', '274,', '275,', '276,', '277,', '278,', '279,', '280,', '281,', '282,', '283,', '284,', '285,', '286,', '287,', '288,', '289,', '290,', '291,', '292,', '293,', '294,', '295,', '296,', '297,'] +function #bs.string:concat +assert data storage bs:out {string:{concat:"0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,"}} + +#last huge test (crash if error) +data modify storage bs:in string.concat.list set value ['0,', '1,', '2,', '3,', '4,', '5,', '6,', '7,', '8,', '9,', '10,', '11,', '12,', '13,', '14,', '15,', '16,', '17,', '18,', '19,', '20,', '21,', '22,', '23,', '24,', '25,', '26,', '27,', '28,', '29,', '30,', '31,', '32,', '33,', '34,', '35,', '36,', '37,', '38,', '39,', '40,', '41,', '42,', '43,', '44,', '45,', '46,', '47,', '48,', '49,', '50,', '51,', '52,', '53,', '54,', '55,', '56,', '57,', '58,', '59,', '60,', '61,', '62,', '63,', '64,', '65,', '66,', '67,', '68,', '69,', '70,', '71,', '72,', '73,', '74,', '75,', '76,', '77,', '78,', '79,', '80,', '81,', '82,', '83,', '84,', '85,', '86,', '87,', '88,', '89,', '90,', '91,', '92,', '93,', '94,', '95,', '96,', '97,', '98,', '99,', '100,', '101,', '102,', '103,', '104,', '105,', '106,', '107,', '108,', '109,', '110,', '111,', '112,', '113,', '114,', '115,', '116,', '117,', '118,', '119,', '120,', '121,', '122,', '123,', '124,', '125,', '126,', '127,', '128,', '129,', '130,', '131,', '132,', '133,', '134,', '135,', '136,', '137,', '138,', '139,', '140,', '141,', '142,', '143,', '144,', '145,', '146,', '147,', '148,', '149,', '150,', '151,', '152,', '153,', '154,', '155,', '156,', '157,', '158,', '159,', '160,', '161,', '162,', '163,', '164,', '165,', '166,', '167,', '168,', '169,', '170,', '171,', '172,', '173,', '174,', '175,', '176,', '177,', '178,', '179,', '180,', '181,', '182,', '183,', '184,', '185,', '186,', '187,', '188,', '189,', '190,', '191,', '192,', '193,', '194,', '195,', '196,', '197,', '198,', '199,', '200,', '201,', '202,', '203,', '204,', '205,', '206,', '207,', '208,', '209,', '210,', '211,', '212,', '213,', '214,', '215,', '216,', '217,', '218,', '219,', '220,', '221,', '222,', '223,', '224,', '225,', '226,', '227,', '228,', '229,', '230,', '231,', '232,', '233,', '234,', '235,', '236,', '237,', '238,', '239,', '240,', '241,', '242,', '243,', '244,', '245,', '246,', '247,', '248,', '249,', '250,', '251,', '252,', '253,', '254,', '255,', '256,', '257,', '258,', '259,', '260,', '261,', '262,', '263,', '264,', '265,', '266,', '267,', '268,', '269,', '270,', '271,', '272,', '273,', '274,', '275,', '276,', '277,', '278,', '279,', '280,', '281,', '282,', '283,', '284,', '285,', '286,', '287,', '288,', '289,', '290,', '291,', '292,', '293,', '294,', '295,', '296,', '297,', '298,', '299,', '300,', '301,', '302,', '303,', '304,', '305,', '306,', '307,', '308,', '309,', '310,', '311,', '312,', '313,', '314,', '315,', '316,', '317,', '318,', '319,', '320,', '321,', '322,', '323,', '324,', '325,', '326,', '327,', '328,', '329,', '330,', '331,', '332,', '333,', '334,', '335,', '336,', '337,', '338,', '339,', '340,', '341,', '342,', '343,', '344,', '345,', '346,', '347,', '348,', '349,', '350,', '351,', '352,', '353,', '354,', '355,', '356,', '357,', '358,', '359,', '360,', '361,', '362,', '363,', '364,', '365,', '366,', '367,', '368,', '369,', '370,', '371,', '372,', '373,', '374,', '375,', '376,', '377,', '378,', '379,', '380,', '381,', '382,', '383,', '384,', '385,', '386,', '387,', '388,', '389,', '390,', '391,', '392,', '393,', '394,', '395,', '396,', '397,', '398,', '399,', '400,', '401,', '402,', '403,', '404,', '405,', '406,', '407,', '408,', '409,', '410,', '411,', '412,', '413,', '414,', '415,', '416,', '417,', '418,', '419,', '420,', '421,', '422,', '423,', '424,', '425,', '426,', '427,', '428,', '429,', '430,', '431,', '432,', '433,', '434,', '435,', '436,', '437,', '438,', '439,', '440,', '441,', '442,', '443,', '444,', '445,', '446,', '447,', '448,', '449,', '450,', '451,', '452,', '453,', '454,', '455,', '456,', '457,', '458,', '459,', '460,', '461,', '462,', '463,', '464,', '465,', '466,', '467,', '468,', '469,', '470,', '471,', '472,', '473,', '474,', '475,', '476,', '477,', '478,', '479,', '480,', '481,', '482,', '483,', '484,', '485,', '486,', '487,', '488,', '489,', '490,', '491,', '492,', '493,', '494,', '495,', '496,', '497,', '498,', '499,', '500,', '501,', '502,', '503,', '504,', '505,', '506,', '507,', '508,', '509,', '510,', '511,', '512,', '513,', '514,', '515,', '516,', '517,', '518,', '519,', '520,', '521,', '522,', '523,', '524,', '525,', '526,', '527,', '528,', '529,', '530,', '531,', '532,', '533,', '534,', '535,', '536,', '537,', '538,', '539,', '540,', '541,', '542,', '543,', '544,', '545,', '546,', '547,', '548,', '549,', '550,', '551,', '552,', '553,', '554,', '555,', '556,', '557,', '558,', '559,', '560,', '561,', '562,', '563,', '564,', '565,', '566,', '567,', '568,', '569,', '570,', '571,', '572,', '573,', '574,', '575,', '576,', '577,', '578,', '579,', '580,', '581,', '582,', '583,', '584,', '585,', '586,', '587,', '588,', '589,', '590,', '591,', '592,', '593,', '594,', '595,', '596,', '597,', '598,', '599,', '600,', '601,', '602,', '603,', '604,', '605,', '606,', '607,', '608,', '609,', '610,', '611,', '612,', '613,', '614,', '615,', '616,', '617,', '618,', '619,', '620,', '621,', '622,', '623,', '624,', '625,', '626,', '627,', '628,', '629,', '630,', '631,', '632,', '633,', '634,', '635,', '636,', '637,', '638,', '639,', '640,', '641,', '642,', '643,', '644,', '645,', '646,', '647,', '648,', '649,', '650,', '651,', '652,', '653,', '654,', '655,', '656,', '657,', '658,', '659,', '660,', '661,', '662,', '663,', '664,', '665,', '666,', '667,', '668,', '669,', '670,', '671,', '672,', '673,', '674,', '675,', '676,', '677,', '678,', '679,', '680,', '681,', '682,', '683,', '684,', '685,', '686,', '687,', '688,', '689,', '690,', '691,', '692,', '693,', '694,', '695,', '696,', '697,', '698,', '699,', '700,', '701,', '702,', '703,', '704,', '705,', '706,', '707,', '708,', '709,', '710,', '711,', '712,', '713,', '714,', '715,', '716,', '717,', '718,', '719,', '720,', '721,', '722,', '723,', '724,', '725,', '726,', '727,', '728,', '729,', '730,', '731,', '732,', '733,', '734,', '735,', '736,', '737,', '738,', '739,', '740,', '741,', '742,', '743,', '744,', '745,', '746,', '747,', '748,', '749,', '750,', '751,', '752,', '753,', '754,', '755,', '756,', '757,', '758,', '759,', '760,', '761,', '762,', '763,', '764,', '765,', '766,', '767,', '768,', '769,', '770,', '771,', '772,', '773,', '774,', '775,', '776,', '777,', '778,', '779,', '780,', '781,', '782,', '783,', '784,', '785,', '786,', '787,', '788,', '789,', '790,', '791,', '792,', '793,', '794,', '795,', '796,', '797,', '798,', '799,', '800,', '801,', '802,', '803,', '804,', '805,', '806,', '807,', '808,', '809,', '810,', '811,', '812,', '813,', '814,', '815,', '816,', '817,', '818,', '819,', '820,', '821,', '822,', '823,', '824,', '825,', '826,', '827,', '828,', '829,', '830,', '831,', '832,', '833,', '834,', '835,', '836,', '837,', '838,', '839,', '840,', '841,', '842,', '843,', '844,', '845,', '846,', '847,', '848,', '849,', '850,', '851,', '852,', '853,', '854,', '855,', '856,', '857,', '858,', '859,', '860,', '861,', '862,', '863,', '864,', '865,', '866,', '867,', '868,', '869,', '870,', '871,', '872,', '873,', '874,', '875,', '876,', '877,', '878,', '879,', '880,', '881,', '882,', '883,', '884,', '885,', '886,', '887,', '888,', '889,', '890,', '891,', '892,', '893,', '894,', '895,', '896,', '897,', '898,', '899,', '900,', '901,', '902,', '903,', '904,', '905,', '906,', '907,', '908,', '909,', '910,', '911,', '912,', '913,', '914,', '915,', '916,', '917,', '918,', '919,', '920,', '921,', '922,', '923,', '924,', '925,', '926,', '927,', '928,', '929,', '930,', '931,', '932,', '933,', '934,', '935,', '936,', '937,', '938,', '939,', '940,', '941,', '942,', '943,', '944,', '945,', '946,', '947,', '948,', '949,', '950,', '951,', '952,', '953,', '954,', '955,', '956,', '957,', '958,', '959,', '960,', '961,', '962,', '963,', '964,', '965,', '966,', '967,', '968,', '969,', '970,', '971,', '972,', '973,', '974,', '975,', '976,', '977,', '978,', '979,', '980,', '981,', '982,', '983,', '984,', '985,', '986,', '987,', '988,', '989,', '990,', '991,', '992,', '993,', '994,', '995,', '996,', '997,', '998,', '999,', '1000,', '1001,', '1002,', '1003,', '1004,', '1005,', '1006,', '1007,', '1008,', '1009,', '1010,', '1011,', '1012,', '1013,', '1014,', '1015,', '1016,', '1017,', '1018,', '1019,', '1020,', '1021,', '1022,', '1023,', '1024,', '1025,', '1026,', '1027,', '1028,', '1029,', '1030,', '1031,', '1032,', '1033,', '1034,', '1035,', '1036,', '1037,', '1038,', '1039,', '1040,', '1041,', '1042,', '1043,', '1044,', '1045,', '1046,', '1047,', '1048,', '1049,', '1050,', '1051,', '1052,', '1053,', '1054,', '1055,', '1056,', '1057,', '1058,', '1059,', '1060,', '1061,', '1062,', '1063,', '1064,', '1065,', '1066,', '1067,', '1068,', '1069,', '1070,', '1071,', '1072,', '1073,', '1074,', '1075,', '1076,', '1077,', '1078,', '1079,', '1080,', '1081,', '1082,', '1083,', '1084,', '1085,', '1086,', '1087,', '1088,', '1089,', '1090,', '1091,', '1092,', '1093,', '1094,', '1095,', '1096,', '1097,', '1098,', '1099,', '1100,', '1101,', '1102,', '1103,', '1104,', '1105,', '1106,', '1107,', '1108,', '1109,', '1110,', '1111,', '1112,', '1113,', '1114,', '1115,', '1116,', '1117,', '1118,', '1119,', '1120,', '1121,', '1122,', '1123,', '1124,', '1125,', '1126,', '1127,', '1128,', '1129,', '1130,', '1131,', '1132,', '1133,', '1134,', '1135,', '1136,', '1137,', '1138,', '1139,', '1140,', '1141,', '1142,', '1143,', '1144,', '1145,', '1146,', '1147,', '1148,', '1149,', '1150,', '1151,', '1152,', '1153,', '1154,', '1155,', '1156,', '1157,', '1158,', '1159,', '1160,', '1161,', '1162,', '1163,', '1164,', '1165,', '1166,', '1167,', '1168,', '1169,', '1170,', '1171,', '1172,', '1173,', '1174,', '1175,', '1176,', '1177,', '1178,', '1179,', '1180,', '1181,', '1182,', '1183,', '1184,', '1185,', '1186,', '1187,', '1188,', '1189,', '1190,', '1191,', '1192,', '1193,', '1194,', '1195,', '1196,', '1197,', '1198,', '1199,', '1200,', '1201,', '1202,', '1203,', '1204,', '1205,', '1206,', '1207,', '1208,', '1209,', '1210,', '1211,', '1212,', '1213,', '1214,', '1215,', '1216,', '1217,', '1218,', '1219,', '1220,', '1221,', '1222,', '1223,', '1224,', '1225,', '1226,', '1227,', '1228,', '1229,', '1230,', '1231,', '1232,', '1233,', '1234,', '1235,', '1236,', '1237,', '1238,', '1239,', '1240,', '1241,', '1242,', '1243,', '1244,', '1245,', '1246,', '1247,', '1248,', '1249,', '1250,', '1251,', '1252,', '1253,', '1254,', '1255,', '1256,', '1257,', '1258,', '1259,', '1260,', '1261,', '1262,', '1263,', '1264,', '1265,', '1266,', '1267,', '1268,', '1269,', '1270,', '1271,', '1272,', '1273,', '1274,', '1275,', '1276,', '1277,', '1278,', '1279,', '1280,', '1281,', '1282,', '1283,', '1284,', '1285,', '1286,', '1287,', '1288,', '1289,', '1290,', '1291,', '1292,', '1293,', '1294,', '1295,', '1296,', '1297,', '1298,', '1299,', '1300,', '1301,', '1302,', '1303,', '1304,', '1305,', '1306,', '1307,', '1308,', '1309,', '1310,', '1311,', '1312,', '1313,', '1314,', '1315,', '1316,', '1317,', '1318,', '1319,', '1320,', '1321,', '1322,', '1323,', '1324,', '1325,', '1326,', '1327,', '1328,', '1329,', '1330,', '1331,', '1332,', '1333,', '1334,', '1335,', '1336,', '1337,', '1338,', '1339,', '1340,', '1341,', '1342,', '1343,', '1344,', '1345,', '1346,', '1347,', '1348,', '1349,', '1350,', '1351,', '1352,', '1353,', '1354,', '1355,', '1356,', '1357,', '1358,', '1359,', '1360,', '1361,', '1362,', '1363,', '1364,', '1365,', '1366,', '1367,', '1368,', '1369,', '1370,', '1371,', '1372,', '1373,', '1374,', '1375,', '1376,', '1377,', '1378,', '1379,', '1380,', '1381,', '1382,', '1383,', '1384,', '1385,', '1386,', '1387,', '1388,', '1389,', '1390,', '1391,', '1392,', '1393,', '1394,', '1395,', '1396,', '1397,', '1398,', '1399,', '1400,', '1401,', '1402,', '1403,', '1404,', '1405,', '1406,', '1407,', '1408,', '1409,', '1410,', '1411,', '1412,', '1413,', '1414,', '1415,', '1416,', '1417,', '1418,', '1419,', '1420,', '1421,', '1422,', '1423,', '1424,', '1425,', '1426,', '1427,', '1428,', '1429,', '1430,', '1431,', '1432,', '1433,', '1434,', '1435,', '1436,', '1437,', '1438,', '1439,', '1440,', '1441,', '1442,', '1443,', '1444,', '1445,', '1446,', '1447,', '1448,', '1449,', '1450,', '1451,', '1452,', '1453,', '1454,', '1455,', '1456,', '1457,', '1458,', '1459,', '1460,', '1461,', '1462,', '1463,', '1464,', '1465,', '1466,', '1467,', '1468,', '1469,', '1470,', '1471,', '1472,', '1473,', '1474,', '1475,', '1476,', '1477,', '1478,', '1479,', '1480,', '1481,', '1482,', '1483,', '1484,', '1485,', '1486,', '1487,', '1488,', '1489,', '1490,', '1491,', '1492,', '1493,', '1494,', '1495,', '1496,', '1497,', '1498,', '1499,', '1500,', '1501,', '1502,', '1503,', '1504,', '1505,', '1506,', '1507,', '1508,', '1509,', '1510,', '1511,', '1512,', '1513,', '1514,', '1515,', '1516,', '1517,', '1518,', '1519,', '1520,', '1521,', '1522,', '1523,', '1524,', '1525,', '1526,', '1527,', '1528,', '1529,', '1530,', '1531,', '1532,', '1533,', '1534,', '1535,', '1536,', '1537,', '1538,', '1539,', '1540,', '1541,', '1542,', '1543,', '1544,', '1545,', '1546,', '1547,', '1548,', '1549,', '1550,', '1551,', '1552,', '1553,', '1554,', '1555,', '1556,', '1557,', '1558,', '1559,', '1560,', '1561,', '1562,', '1563,', '1564,', '1565,', '1566,', '1567,', '1568,', '1569,', '1570,', '1571,', '1572,', '1573,', '1574,', '1575,', '1576,', '1577,', '1578,', '1579,', '1580,', '1581,', '1582,', '1583,', '1584,', '1585,', '1586,', '1587,', '1588,', '1589,', '1590,', '1591,', '1592,', '1593,', '1594,', '1595,', '1596,', '1597,', '1598,', '1599,', '1600,', '1601,', '1602,', '1603,', '1604,', '1605,', '1606,', '1607,', '1608,', '1609,', '1610,', '1611,', '1612,', '1613,', '1614,', '1615,', '1616,', '1617,', '1618,', '1619,', '1620,', '1621,', '1622,', '1623,', '1624,', '1625,', '1626,', '1627,', '1628,', '1629,', '1630,', '1631,', '1632,', '1633,', '1634,', '1635,', '1636,', '1637,', '1638,', '1639,', '1640,', '1641,', '1642,', '1643,', '1644,', '1645,', '1646,', '1647,', '1648,', '1649,', '1650,', '1651,', '1652,', '1653,', '1654,', '1655,', '1656,', '1657,', '1658,', '1659,', '1660,', '1661,', '1662,', '1663,', '1664,', '1665,', '1666,', '1667,', '1668,', '1669,', '1670,', '1671,', '1672,', '1673,', '1674,', '1675,', '1676,', '1677,', '1678,', '1679,', '1680,', '1681,', '1682,', '1683,', '1684,', '1685,', '1686,', '1687,', '1688,', '1689,', '1690,', '1691,', '1692,', '1693,', '1694,', '1695,', '1696,', '1697,', '1698,', '1699,', '1700,', '1701,', '1702,', '1703,', '1704,', '1705,', '1706,', '1707,', '1708,', '1709,', '1710,', '1711,', '1712,', '1713,', '1714,', '1715,', '1716,', '1717,', '1718,', '1719,', '1720,', '1721,', '1722,', '1723,', '1724,', '1725,', '1726,', '1727,', '1728,', '1729,', '1730,', '1731,', '1732,', '1733,', '1734,', '1735,', '1736,', '1737,', '1738,', '1739,', '1740,', '1741,', '1742,', '1743,', '1744,', '1745,', '1746,', '1747,', '1748,', '1749,', '1750,', '1751,', '1752,', '1753,', '1754,', '1755,', '1756,', '1757,', '1758,', '1759,', '1760,', '1761,', '1762,', '1763,', '1764,', '1765,', '1766,', '1767,', '1768,', '1769,', '1770,', '1771,', '1772,', '1773,', '1774,', '1775,', '1776,', '1777,', '1778,', '1779,', '1780,', '1781,', '1782,', '1783,', '1784,', '1785,', '1786,', '1787,', '1788,', '1789,', '1790,', '1791,', '1792,', '1793,', '1794,', '1795,', '1796,', '1797,', '1798,', '1799,', '1800,', '1801,', '1802,', '1803,', '1804,', '1805,', '1806,', '1807,', '1808,', '1809,', '1810,', '1811,', '1812,', '1813,', '1814,', '1815,', '1816,', '1817,', '1818,', '1819,', '1820,', '1821,', '1822,', '1823,', '1824,', '1825,', '1826,', '1827,', '1828,', '1829,', '1830,', '1831,', '1832,', '1833,', '1834,', '1835,', '1836,', '1837,', '1838,', '1839,', '1840,', '1841,', '1842,', '1843,', '1844,', '1845,', '1846,', '1847,', '1848,', '1849,', '1850,', '1851,', '1852,', '1853,', '1854,', '1855,', '1856,', '1857,', '1858,', '1859,', '1860,', '1861,', '1862,', '1863,', '1864,', '1865,', '1866,', '1867,', '1868,', '1869,', '1870,', '1871,', '1872,', '1873,', '1874,', '1875,', '1876,', '1877,', '1878,', '1879,', '1880,', '1881,', '1882,', '1883,', '1884,', '1885,', '1886,', '1887,', '1888,', '1889,', '1890,', '1891,', '1892,', '1893,', '1894,', '1895,', '1896,', '1897,', '1898,', '1899,', '1900,', '1901,', '1902,', '1903,', '1904,', '1905,', '1906,', '1907,', '1908,', '1909,', '1910,', '1911,', '1912,', '1913,', '1914,', '1915,', '1916,', '1917,', '1918,', '1919,', '1920,', '1921,', '1922,', '1923,', '1924,', '1925,', '1926,', '1927,', '1928,', '1929,', '1930,', '1931,', '1932,', '1933,', '1934,', '1935,', '1936,', '1937,', '1938,', '1939,', '1940,', '1941,', '1942,', '1943,', '1944,', '1945,', '1946,', '1947,', '1948,', '1949,', '1950,', '1951,', '1952,', '1953,', '1954,', '1955,', '1956,', '1957,', '1958,', '1959,', '1960,', '1961,', '1962,', '1963,', '1964,', '1965,', '1966,', '1967,', '1968,', '1969,', '1970,', '1971,', '1972,', '1973,', '1974,', '1975,', '1976,', '1977,', '1978,', '1979,', '1980,', '1981,', '1982,', '1983,', '1984,', '1985,', '1986,', '1987,', '1988,', '1989,', '1990,', '1991,', '1992,', '1993,', '1994,', '1995,', '1996,', '1997,', '1998,', '1999,', '2000,', '2001,', '2002,', '2003,', '2004,', '2005,', '2006,', '2007,', '2008,', '2009,', '2010,', '2011,', '2012,', '2013,', '2014,', '2015,', '2016,', '2017,', '2018,', '2019,', '2020,', '2021,', '2022,', '2023,', '2024,', '2025,', '2026,', '2027,', '2028,', '2029,', '2030,', '2031,', '2032,', '2033,', '2034,', '2035,', '2036,', '2037,', '2038,', '2039,', '2040,', '2041,', '2042,', '2043,', '2044,', '2045,', '2046,', '2047,', '2048,', '2049,', '2050,', '2051,', '2052,', '2053,', '2054,', '2055,', '2056,', '2057,', '2058,', '2059,', '2060,', '2061,', '2062,', '2063,', '2064,', '2065,', '2066,', '2067,', '2068,', '2069,', '2070,', '2071,', '2072,', '2073,', '2074,', '2075,', '2076,', '2077,', '2078,', '2079,', '2080,', '2081,', '2082,', '2083,', '2084,', '2085,', '2086,', '2087,', '2088,', '2089,', '2090,', '2091,', '2092,', '2093,', '2094,', '2095,', '2096,', '2097,', '2098,', '2099,', '2100,', '2101,', '2102,', '2103,', '2104,', '2105,', '2106,', '2107,', '2108,', '2109,', '2110,', '2111,', '2112,', '2113,', '2114,', '2115,', '2116,', '2117,', '2118,', '2119,', '2120,', '2121,', '2122,', '2123,', '2124,', '2125,', '2126,', '2127,', '2128,', '2129,', '2130,', '2131,', '2132,', '2133,', '2134,', '2135,', '2136,', '2137,', '2138,', '2139,', '2140,', '2141,', '2142,', '2143,', '2144,', '2145,', '2146,', '2147,', '2148,', '2149,', '2150,', '2151,', '2152,', '2153,', '2154,', '2155,', '2156,', '2157,', '2158,', '2159,', '2160,', '2161,', '2162,', '2163,', '2164,', '2165,', '2166,', '2167,', '2168,', '2169,', '2170,', '2171,', '2172,', '2173,', '2174,', '2175,', '2176,', '2177,', '2178,', '2179,', '2180,', '2181,', '2182,', '2183,', '2184,', '2185,', '2186,', '2187,', '2188,', '2189,', '2190,', '2191,', '2192,', '2193,', '2194,', '2195,', '2196,', '2197,', '2198,', '2199,', '2200,', '2201,', '2202,', '2203,', '2204,', '2205,', '2206,', '2207,', '2208,', '2209,', '2210,', '2211,', '2212,', '2213,', '2214,', '2215,', '2216,', '2217,', '2218,', '2219,', '2220,', '2221,', '2222,', '2223,', '2224,', '2225,', '2226,', '2227,', '2228,', '2229,', '2230,', '2231,', '2232,', '2233,', '2234,', '2235,', '2236,', '2237,', '2238,', '2239,', '2240,', '2241,', '2242,', '2243,', '2244,', '2245,', '2246,', '2247,', '2248,', '2249,', '2250,', '2251,', '2252,', '2253,', '2254,', '2255,', '2256,', '2257,', '2258,', '2259,', '2260,', '2261,', '2262,', '2263,', '2264,', '2265,', '2266,', '2267,', '2268,', '2269,', '2270,', '2271,', '2272,', '2273,', '2274,', '2275,', '2276,', '2277,', '2278,', '2279,', '2280,', '2281,', '2282,', '2283,', '2284,', '2285,', '2286,', '2287,', '2288,', '2289,', '2290,', '2291,', '2292,'] + +function #bs.string:concat + +assert data storage bs:out {string:{concat:"0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,483,484,485,486,487,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,503,504,505,506,507,508,509,510,511,512,513,514,515,516,517,518,519,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,536,537,538,539,540,541,542,543,544,545,546,547,548,549,550,551,552,553,554,555,556,557,558,559,560,561,562,563,564,565,566,567,568,569,570,571,572,573,574,575,576,577,578,579,580,581,582,583,584,585,586,587,588,589,590,591,592,593,594,595,596,597,598,599,600,601,602,603,604,605,606,607,608,609,610,611,612,613,614,615,616,617,618,619,620,621,622,623,624,625,626,627,628,629,630,631,632,633,634,635,636,637,638,639,640,641,642,643,644,645,646,647,648,649,650,651,652,653,654,655,656,657,658,659,660,661,662,663,664,665,666,667,668,669,670,671,672,673,674,675,676,677,678,679,680,681,682,683,684,685,686,687,688,689,690,691,692,693,694,695,696,697,698,699,700,701,702,703,704,705,706,707,708,709,710,711,712,713,714,715,716,717,718,719,720,721,722,723,724,725,726,727,728,729,730,731,732,733,734,735,736,737,738,739,740,741,742,743,744,745,746,747,748,749,750,751,752,753,754,755,756,757,758,759,760,761,762,763,764,765,766,767,768,769,770,771,772,773,774,775,776,777,778,779,780,781,782,783,784,785,786,787,788,789,790,791,792,793,794,795,796,797,798,799,800,801,802,803,804,805,806,807,808,809,810,811,812,813,814,815,816,817,818,819,820,821,822,823,824,825,826,827,828,829,830,831,832,833,834,835,836,837,838,839,840,841,842,843,844,845,846,847,848,849,850,851,852,853,854,855,856,857,858,859,860,861,862,863,864,865,866,867,868,869,870,871,872,873,874,875,876,877,878,879,880,881,882,883,884,885,886,887,888,889,890,891,892,893,894,895,896,897,898,899,900,901,902,903,904,905,906,907,908,909,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,930,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,975,976,977,978,979,980,981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000,1001,1002,1003,1004,1005,1006,1007,1008,1009,1010,1011,1012,1013,1014,1015,1016,1017,1018,1019,1020,1021,1022,1023,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1120,1121,1122,1123,1124,1125,1126,1127,1128,1129,1130,1131,1132,1133,1134,1135,1136,1137,1138,1139,1140,1141,1142,1143,1144,1145,1146,1147,1148,1149,1150,1151,1152,1153,1154,1155,1156,1157,1158,1159,1160,1161,1162,1163,1164,1165,1166,1167,1168,1169,1170,1171,1172,1173,1174,1175,1176,1177,1178,1179,1180,1181,1182,1183,1184,1185,1186,1187,1188,1189,1190,1191,1192,1193,1194,1195,1196,1197,1198,1199,1200,1201,1202,1203,1204,1205,1206,1207,1208,1209,1210,1211,1212,1213,1214,1215,1216,1217,1218,1219,1220,1221,1222,1223,1224,1225,1226,1227,1228,1229,1230,1231,1232,1233,1234,1235,1236,1237,1238,1239,1240,1241,1242,1243,1244,1245,1246,1247,1248,1249,1250,1251,1252,1253,1254,1255,1256,1257,1258,1259,1260,1261,1262,1263,1264,1265,1266,1267,1268,1269,1270,1271,1272,1273,1274,1275,1276,1277,1278,1279,1280,1281,1282,1283,1284,1285,1286,1287,1288,1289,1290,1291,1292,1293,1294,1295,1296,1297,1298,1299,1300,1301,1302,1303,1304,1305,1306,1307,1308,1309,1310,1311,1312,1313,1314,1315,1316,1317,1318,1319,1320,1321,1322,1323,1324,1325,1326,1327,1328,1329,1330,1331,1332,1333,1334,1335,1336,1337,1338,1339,1340,1341,1342,1343,1344,1345,1346,1347,1348,1349,1350,1351,1352,1353,1354,1355,1356,1357,1358,1359,1360,1361,1362,1363,1364,1365,1366,1367,1368,1369,1370,1371,1372,1373,1374,1375,1376,1377,1378,1379,1380,1381,1382,1383,1384,1385,1386,1387,1388,1389,1390,1391,1392,1393,1394,1395,1396,1397,1398,1399,1400,1401,1402,1403,1404,1405,1406,1407,1408,1409,1410,1411,1412,1413,1414,1415,1416,1417,1418,1419,1420,1421,1422,1423,1424,1425,1426,1427,1428,1429,1430,1431,1432,1433,1434,1435,1436,1437,1438,1439,1440,1441,1442,1443,1444,1445,1446,1447,1448,1449,1450,1451,1452,1453,1454,1455,1456,1457,1458,1459,1460,1461,1462,1463,1464,1465,1466,1467,1468,1469,1470,1471,1472,1473,1474,1475,1476,1477,1478,1479,1480,1481,1482,1483,1484,1485,1486,1487,1488,1489,1490,1491,1492,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,1515,1516,1517,1518,1519,1520,1521,1522,1523,1524,1525,1526,1527,1528,1529,1530,1531,1532,1533,1534,1535,1536,1537,1538,1539,1540,1541,1542,1543,1544,1545,1546,1547,1548,1549,1550,1551,1552,1553,1554,1555,1556,1557,1558,1559,1560,1561,1562,1563,1564,1565,1566,1567,1568,1569,1570,1571,1572,1573,1574,1575,1576,1577,1578,1579,1580,1581,1582,1583,1584,1585,1586,1587,1588,1589,1590,1591,1592,1593,1594,1595,1596,1597,1598,1599,1600,1601,1602,1603,1604,1605,1606,1607,1608,1609,1610,1611,1612,1613,1614,1615,1616,1617,1618,1619,1620,1621,1622,1623,1624,1625,1626,1627,1628,1629,1630,1631,1632,1633,1634,1635,1636,1637,1638,1639,1640,1641,1642,1643,1644,1645,1646,1647,1648,1649,1650,1651,1652,1653,1654,1655,1656,1657,1658,1659,1660,1661,1662,1663,1664,1665,1666,1667,1668,1669,1670,1671,1672,1673,1674,1675,1676,1677,1678,1679,1680,1681,1682,1683,1684,1685,1686,1687,1688,1689,1690,1691,1692,1693,1694,1695,1696,1697,1698,1699,1700,1701,1702,1703,1704,1705,1706,1707,1708,1709,1710,1711,1712,1713,1714,1715,1716,1717,1718,1719,1720,1721,1722,1723,1724,1725,1726,1727,1728,1729,1730,1731,1732,1733,1734,1735,1736,1737,1738,1739,1740,1741,1742,1743,1744,1745,1746,1747,1748,1749,1750,1751,1752,1753,1754,1755,1756,1757,1758,1759,1760,1761,1762,1763,1764,1765,1766,1767,1768,1769,1770,1771,1772,1773,1774,1775,1776,1777,1778,1779,1780,1781,1782,1783,1784,1785,1786,1787,1788,1789,1790,1791,1792,1793,1794,1795,1796,1797,1798,1799,1800,1801,1802,1803,1804,1805,1806,1807,1808,1809,1810,1811,1812,1813,1814,1815,1816,1817,1818,1819,1820,1821,1822,1823,1824,1825,1826,1827,1828,1829,1830,1831,1832,1833,1834,1835,1836,1837,1838,1839,1840,1841,1842,1843,1844,1845,1846,1847,1848,1849,1850,1851,1852,1853,1854,1855,1856,1857,1858,1859,1860,1861,1862,1863,1864,1865,1866,1867,1868,1869,1870,1871,1872,1873,1874,1875,1876,1877,1878,1879,1880,1881,1882,1883,1884,1885,1886,1887,1888,1889,1890,1891,1892,1893,1894,1895,1896,1897,1898,1899,1900,1901,1902,1903,1904,1905,1906,1907,1908,1909,1910,1911,1912,1913,1914,1915,1916,1917,1918,1919,1920,1921,1922,1923,1924,1925,1926,1927,1928,1929,1930,1931,1932,1933,1934,1935,1936,1937,1938,1939,1940,1941,1942,1943,1944,1945,1946,1947,1948,1949,1950,1951,1952,1953,1954,1955,1956,1957,1958,1959,1960,1961,1962,1963,1964,1965,1966,1967,1968,1969,1970,1971,1972,1973,1974,1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024,2025,2026,2027,2028,2029,2030,2031,2032,2033,2034,2035,2036,2037,2038,2039,2040,2041,2042,2043,2044,2045,2046,2047,2048,2049,2050,2051,2052,2053,2054,2055,2056,2057,2058,2059,2060,2061,2062,2063,2064,2065,2066,2067,2068,2069,2070,2071,2072,2073,2074,2075,2076,2077,2078,2079,2080,2081,2082,2083,2084,2085,2086,2087,2088,2089,2090,2091,2092,2093,2094,2095,2096,2097,2098,2099,2100,2101,2102,2103,2104,2105,2106,2107,2108,2109,2110,2111,2112,2113,2114,2115,2116,2117,2118,2119,2120,2121,2122,2123,2124,2125,2126,2127,2128,2129,2130,2131,2132,2133,2134,2135,2136,2137,2138,2139,2140,2141,2142,2143,2144,2145,2146,2147,2148,2149,2150,2151,2152,2153,2154,2155,2156,2157,2158,2159,2160,2161,2162,2163,2164,2165,2166,2167,2168,2169,2170,2171,2172,2173,2174,2175,2176,2177,2178,2179,2180,2181,2182,2183,2184,2185,2186,2187,2188,2189,2190,2191,2192,2193,2194,2195,2196,2197,2198,2199,2200,2201,2202,2203,2204,2205,2206,2207,2208,2209,2210,2211,2212,2213,2214,2215,2216,2217,2218,2219,2220,2221,2222,2223,2224,2225,2226,2227,2228,2229,2230,2231,2232,2233,2234,2235,2236,2237,2238,2239,2240,2241,2242,2243,2244,2245,2246,2247,2248,2249,2250,2251,2252,2253,2254,2255,2256,2257,2258,2259,2260,2261,2262,2263,2264,2265,2266,2267,2268,2269,2270,2271,2272,2273,2274,2275,2276,2277,2278,2279,2280,2281,2282,2283,2284,2285,2286,2287,2288,2289,2290,2291,2292,"}} + +data modify storage bs:out string.concat set value [] diff --git a/modules/bs.string/data/bs.string/test/find.mcfunction b/modules/bs.string/data/bs.string/test/find.mcfunction new file mode 100644 index 000000000..ac91ff3d1 --- /dev/null +++ b/modules/bs.string/data/bs.string/test/find.mcfunction @@ -0,0 +1,68 @@ +# ------------------------------------------------------------------------------------------------------------ +# Copyright (c) 2025 Gunivers +# +# This file is part of the Bookshelf project (https://github.com/mcbookshelf/Bookshelf). +# +# This source code is subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Conditions: +# - You may use this file in compliance with the MPL v2.0 +# - Any modifications must be documented and disclosed under the same license +# +# For more details, refer to the MPL v2.0. +# ------------------------------------------------------------------------------------------------------------ + +# Test basic find +data modify storage bs:in string.find.str set value "hello world" +data modify storage bs:in string.find.needle set value "world" +function #bs.string:find {occurrence:0} +assert data storage bs:out {string:{find:[6]}} + +# Test empty string +data modify storage bs:in string.find.str set value "" +data modify storage bs:in string.find.needle set value "test" +function #bs.string:find {occurrence:0} +assert data storage bs:out {string:{find:[]}} + +# Test empty needle +data modify storage bs:in string.find.str set value "test string" +data modify storage bs:in string.find.needle set value "" +function #bs.string:find {occurrence:0} +assert data storage bs:out {string:{find:[]}} + +# Test multiple occurrences +data modify storage bs:in string.find.str set value "test test test" +data modify storage bs:in string.find.needle set value "test" +function #bs.string:find {occurrence:0} +assert data storage bs:out {string:{find:[0,5,10]}} + +# Test with occurrence limit +data modify storage bs:in string.find.str set value "find find find find" +data modify storage bs:in string.find.needle set value "find" +function #bs.string:find {occurrence:2} +assert data storage bs:out {string:{find:[0,5]}} + +# Test with Unicode +data modify storage bs:in string.find.str set value "éàêëàéêë" +data modify storage bs:in string.find.needle set value "êë" +function #bs.string:find {occurrence:0} +assert data storage bs:out {string:{find:[2,6]}} + +# Test case sensitivity +data modify storage bs:in string.find.str set value "Test TEST test" +data modify storage bs:in string.find.needle set value "test" +function #bs.string:find {occurrence:0} +assert data storage bs:out {string:{find:[10]}} + +# Test overlapping patterns +data modify storage bs:in string.find.str set value "aaaaa" +data modify storage bs:in string.find.needle set value "aa" +function #bs.string:find {occurrence:0} +assert data storage bs:out {string:{find:[0,1,2,3]}} + +# Test needle not found +data modify storage bs:in string.find.str set value "hello world" +data modify storage bs:in string.find.needle set value "notfound" +function #bs.string:find {occurrence:0} +assert data storage bs:out {string:{find:[]}} diff --git a/modules/bs.string/data/bs.string/test/insert.mcfunction b/modules/bs.string/data/bs.string/test/insert.mcfunction new file mode 100644 index 000000000..01d21f813 --- /dev/null +++ b/modules/bs.string/data/bs.string/test/insert.mcfunction @@ -0,0 +1,62 @@ +# ------------------------------------------------------------------------------------------------------------ +# Copyright (c) 2025 Gunivers +# +# This file is part of the Bookshelf project (https://github.com/mcbookshelf/Bookshelf). +# +# This source code is subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Conditions: +# - You may use this file in compliance with the MPL v2.0 +# - Any modifications must be documented and disclosed under the same license +# +# For more details, refer to the MPL v2.0. +# ------------------------------------------------------------------------------------------------------------ + +# Test basic insert +data modify storage bs:in string.insert.str set value "Hello World" +data modify storage bs:in string.insert.needle set value "Beautiful " +function #bs.string:insert {index:6} +assert data storage bs:out {string:{insert:"Hello Beautiful World"}} + +# Test insert at start +data modify storage bs:in string.insert.str set value "World" +data modify storage bs:in string.insert.needle set value "Hello " +function #bs.string:insert {index:0} +assert data storage bs:out {string:{insert:"Hello World"}} + +# Test insert at end +data modify storage bs:in string.insert.str set value "Hello" +data modify storage bs:in string.insert.needle set value " World" +function #bs.string:insert {index:5} +assert data storage bs:out {string:{insert:"Hello World"}} + +# Test insert into empty string +data modify storage bs:in string.insert.str set value "" +data modify storage bs:in string.insert.needle set value "test" +function #bs.string:insert {index:0} +assert data storage bs:out {string:{insert:"test"}} + +# Test insert empty string +data modify storage bs:in string.insert.str set value "test" +data modify storage bs:in string.insert.needle set value "" +function #bs.string:insert {index:2} +assert data storage bs:out {string:{insert:"test"}} + +# Test with Unicode +data modify storage bs:in string.insert.str set value "éë" +data modify storage bs:in string.insert.needle set value "à" +function #bs.string:insert {index:1} +assert data storage bs:out {string:{insert:"éàë"}} + +# Test with index beyond string length +# data modify storage bs:in string.insert.str set value "test" +# data modify storage bs:in string.insert.needle set value " append" +# function #bs.string:insert {index:99} +# assert data storage bs:out {string:{insert:"test append"}} + +# Test with negative index +data modify storage bs:in string.insert.str set value "test" +data modify storage bs:in string.insert.needle set value "pre " +function #bs.string:insert {index:-4} +assert data storage bs:out {string:{insert:"pre test"}} diff --git a/modules/bs.string/data/bs.string/test/replace.mcfunction b/modules/bs.string/data/bs.string/test/replace.mcfunction new file mode 100644 index 000000000..81f906da9 --- /dev/null +++ b/modules/bs.string/data/bs.string/test/replace.mcfunction @@ -0,0 +1,77 @@ +# ------------------------------------------------------------------------------------------------------------ +# Copyright (c) 2025 Gunivers +# +# This file is part of the Bookshelf project (https://github.com/mcbookshelf/Bookshelf). +# +# This source code is subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Conditions: +# - You may use this file in compliance with the MPL v2.0 +# - Any modifications must be documented and disclosed under the same license +# +# For more details, refer to the MPL v2.0. +# ------------------------------------------------------------------------------------------------------------ + +# Test basic replacement +data modify storage bs:in string.replace.str set value "hello world" +data modify storage bs:in string.replace.old set value "world" +data modify storage bs:in string.replace.new set value "minecraft" +function #bs.string:replace +assert data storage bs:out {string:{replace:"hello minecraft"}} + +# Test empty string +data modify storage bs:in string.replace.str set value "" +data modify storage bs:in string.replace.old set value "test" +data modify storage bs:in string.replace.new set value "replace" +function #bs.string:replace +assert data storage bs:out {string:{replace:""}} + +# Test empty old string +data modify storage bs:in string.replace.str set value "test string" +data modify storage bs:in string.replace.old set value "" +data modify storage bs:in string.replace.new set value "X" +function #bs.string:replace +assert data storage bs:out {string:{replace:"test string"}} + +# Test empty new string +data modify storage bs:in string.replace.str set value "remove this" +data modify storage bs:in string.replace.old set value "this" +data modify storage bs:in string.replace.new set value "" +function #bs.string:replace +assert data storage bs:out {string:{replace:"remove "}} + +# Test multiple replacements +data modify storage bs:in string.replace.str set value "a a a a" +data modify storage bs:in string.replace.old set value "a" +data modify storage bs:in string.replace.new set value "b" +function #bs.string:replace +assert data storage bs:out {string:{replace:"b b b b"}} + +# Test case sensitivity +data modify storage bs:in string.replace.str set value "Test test TEST" +data modify storage bs:in string.replace.old set value "test" +data modify storage bs:in string.replace.new set value "replaced" +function #bs.string:replace +assert data storage bs:out {string:{replace:"Test replaced TEST"}} + +# Test with Unicode +data modify storage bs:in string.replace.str set value "éàêë" +data modify storage bs:in string.replace.old set value "ê" +data modify storage bs:in string.replace.new set value "e" +function #bs.string:replace +assert data storage bs:out {string:{replace:"éàeë"}} + +# Test replacing with longer string +data modify storage bs:in string.replace.str set value "short" +data modify storage bs:in string.replace.old set value "short" +data modify storage bs:in string.replace.new set value "very long replacement" +function #bs.string:replace +assert data storage bs:out {string:{replace:"very long replacement"}} + +# Test replacing with shorter string +data modify storage bs:in string.replace.str set value "very long original" +data modify storage bs:in string.replace.old set value "very long" +data modify storage bs:in string.replace.new set value "short" +function #bs.string:replace +assert data storage bs:out {string:{replace:"short original"}} diff --git a/modules/bs.string/data/bs.string/test/reversed.mcfunction b/modules/bs.string/data/bs.string/test/reversed.mcfunction new file mode 100644 index 000000000..b2b3de93c --- /dev/null +++ b/modules/bs.string/data/bs.string/test/reversed.mcfunction @@ -0,0 +1,39 @@ +# ------------------------------------------------------------------------------------------------------------ +# Copyright (c) 2025 Gunivers +# +# This file is part of the Bookshelf project (https://github.com/mcbookshelf/Bookshelf). +# +# This source code is subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Conditions: +# - You may use this file in compliance with the MPL v2.0 +# - Any modifications must be documented and disclosed under the same license +# +# For more details, refer to the MPL v2.0. +# ------------------------------------------------------------------------------------------------------------ + +# Test empty string +data modify storage bs:in string.reversed.str set value "" +function #bs.string:reversed +assert data storage bs:out {string:{reversed:""}} + +# Test single character +data modify storage bs:in string.reversed.str set value "a" +function #bs.string:reversed +assert data storage bs:out {string:{reversed:"a"}} + +# Test normal string +data modify storage bs:in string.reversed.str set value "Hello World" +function #bs.string:reversed +assert data storage bs:out {string:{reversed:"dlroW olleH"}} + +# Test string with special characters +data modify storage bs:in string.reversed.str set value "!@#$%^" +function #bs.string:reversed +assert data storage bs:out {string:{reversed:"^%$#@!"}} + +# Test string with numbers +data modify storage bs:in string.reversed.str set value "12345" +function #bs.string:reversed +assert data storage bs:out {string:{reversed:"54321"}} \ No newline at end of file diff --git a/modules/bs.string/data/bs.string/test/split.mcfunction b/modules/bs.string/data/bs.string/test/split.mcfunction new file mode 100644 index 000000000..ddf039e5c --- /dev/null +++ b/modules/bs.string/data/bs.string/test/split.mcfunction @@ -0,0 +1,68 @@ +# ------------------------------------------------------------------------------------------------------------ +# Copyright (c) 2025 Gunivers +# +# This file is part of the Bookshelf project (https://github.com/mcbookshelf/Bookshelf). +# +# This source code is subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Conditions: +# - You may use this file in compliance with the MPL v2.0 +# - Any modifications must be documented and disclosed under the same license +# +# For more details, refer to the MPL v2.0. +# ------------------------------------------------------------------------------------------------------------ + +# Test basic split +data modify storage bs:in string.split.str set value "a,b,c,d" +data modify storage bs:in string.split.separator set value "," +function #bs.string:split {maxsplit:0} +assert data storage bs:out {string:{split:["a","b","c","d"]}} + +# Test with empty string +data modify storage bs:in string.split.str set value "" +data modify storage bs:in string.split.separator set value "," +function #bs.string:split {maxsplit:0} +assert data storage bs:out {string:{split:[""]}} + +# Test with empty separator (to hard to implement use to_list insted) +data modify storage bs:in string.split.str set value "abc" +data modify storage bs:in string.split.separator set value "" +function #bs.string:split {maxsplit:0} +assert data storage bs:out {string:{split:["a","b","c"]}} + +# Test with multiple consecutive separators +data modify storage bs:in string.split.str set value "a,,b,,,c" +data modify storage bs:in string.split.separator set value "," +function #bs.string:split {maxsplit:0} +assert data storage bs:out {string:{split:["a","","b","","","c"]}} + +# Test with separator at start/end +data modify storage bs:in string.split.str set value ",start,middle,end," +data modify storage bs:in string.split.separator set value "," +function #bs.string:split {maxsplit:0} +assert data storage bs:out {string:{split:["","start","middle","end",""]}} + +# Test with maxsplit +data modify storage bs:in string.split.str set value "a:b:c:d:e" +data modify storage bs:in string.split.separator set value ":" +function #bs.string:split {maxsplit:2} +assert data storage bs:out {string:{split:["a","b","c:d:e"]}} + +# Test with spaces +data modify storage bs:in string.split.str set value " spaces between words " +data modify storage bs:in string.split.separator set value " " +function #bs.string:split {maxsplit:0} +assert data storage bs:out {string:{split:["","","spaces","","between","","words","",""]}} + +# Test with longer separator +data modify storage bs:in string.split.str set value "word<->split<->by<->arrow" +data modify storage bs:in string.split.separator set value "<->" +function #bs.string:split {maxsplit:0} +assert data storage bs:out {string:{split:["word","split","by","arrow"]}} + +# Test with Unicode +data modify storage bs:in string.split.str set value "é★à★ê★ë" +data modify storage bs:in string.split.separator set value "★" +function #bs.string:split {maxsplit:0} +assert data storage bs:out {string:{split:["é","à","ê","ë"]}} diff --git a/modules/bs.string/data/bs.string/test/type.mcfunction b/modules/bs.string/data/bs.string/test/type.mcfunction new file mode 100644 index 000000000..ea0590345 --- /dev/null +++ b/modules/bs.string/data/bs.string/test/type.mcfunction @@ -0,0 +1,19 @@ +# ------------------------------------------------------------------------------------------------------------ +# Copyright (c) 2025 Gunivers +# +# This file is part of the Bookshelf project (https://github.com/mcbookshelf/Bookshelf). +# +# This source code is subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Conditions: +# - You may use this file in compliance with the MPL v2.0 +# - Any modifications must be documented and disclosed under the same license +# +# For more details, refer to the MPL v2.0. +# ------------------------------------------------------------------------------------------------------------ + +#to_list +data modify storage bs:in string.to_list.str set value "le mot" +function #bs.string:to_list +assert data storage bs:out {string:{to_list:["l","e"," ","m","o","t"]}} diff --git a/modules/bs.string/data/bs.string/test/upper_lower.mcfunction b/modules/bs.string/data/bs.string/test/upper_lower.mcfunction new file mode 100644 index 000000000..50d466c18 --- /dev/null +++ b/modules/bs.string/data/bs.string/test/upper_lower.mcfunction @@ -0,0 +1,24 @@ +# ------------------------------------------------------------------------------------------------------------ +# Copyright (c) 2025 Gunivers +# +# This file is part of the Bookshelf project (https://github.com/mcbookshelf/Bookshelf). +# +# This source code is subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Conditions: +# - You may use this file in compliance with the MPL v2.0 +# - Any modifications must be documented and disclosed under the same license +# +# For more details, refer to the MPL v2.0. +# ------------------------------------------------------------------------------------------------------------ + +#Setup fast storage +data modify storage bs:in string.lower.str set value "HELLO WORLD" +data modify storage bs:in string.upper.str set value "hello world" +function #bs.string:lower +function #bs.string:upper + +#Test +assert data storage bs:out {string:{lower:"hello world"}} +assert data storage bs:out {string:{upper:"HELLO WORLD"}} diff --git a/modules/bs.string/gen_file.py b/modules/bs.string/gen_file.py new file mode 100644 index 000000000..9a649d413 --- /dev/null +++ b/modules/bs.string/gen_file.py @@ -0,0 +1,23 @@ +from beet import Context, Function, FunctionTag + +Max = 2**11 + +def beet_default(ctx: Context) -> None: + """Generate a help function for the current module.""" + with ctx.override(generate_namespace=ctx.directory.name): + for a in range(64) : + generate(a+1,ctx) + for i in range(11) : + a = (2**(i+1)) + generate(a,ctx) + +def generate(n : int ,ctx: Context) -> None: + ctx.generate("concat/combine/"+str(n), + a=n, + max=Max, + render=Function(source_path="concat.jinja"), + ) + ctx.generate("concat/combine/"+str(n)+"c", + a=n, + render=Function(source_path="concat_macros.jinja"), + ) diff --git a/modules/bs.string/module.json b/modules/bs.string/module.json new file mode 100644 index 000000000..3fae78a68 --- /dev/null +++ b/modules/bs.string/module.json @@ -0,0 +1,20 @@ +{ + "extend": "../config.json", + "data_pack": { + "name": "bs.string", + "load": "." + }, + "meta": { + "name": "String", + "slug": "bookshelf-string", + "description": "Get information about the system string effortlessly.", + "documentation": "https://docs.mcbookshelf.dev/en/latest/modules/string.html", + "tags": ["default"], + "weak_dependencies": [ + "bs.log" + ] + }, + "pipeline": [ + "gen_file" + ] +} diff --git a/modules/bs.string/templates/concat.jinja b/modules/bs.string/templates/concat.jinja new file mode 100644 index 000000000..1bcfb2a8e --- /dev/null +++ b/modules/bs.string/templates/concat.jinja @@ -0,0 +1,11 @@ +{% include 'core/header.jinja' %} +# This file was automatically generated, do not edit +scoreboard players remove #n bs.ctx {{a}} +{% for i in range(a) -%} +data modify storage bs:ctx _.s.{{i+2}} set from storage bs:ctx _.list[-1] +data remove storage bs:ctx _.list[-1] +{% endfor -%} +function bs.string:concat/combine/{{a}}c with storage bs:ctx _.s +{%if a == max -%} +execute if score #n bs.ctx matches 2048.. run function bs.string:concat/combine/{{max}} +{%endif -%} diff --git a/modules/bs.string/templates/concat_macros.jinja b/modules/bs.string/templates/concat_macros.jinja new file mode 100644 index 000000000..9e3c3a664 --- /dev/null +++ b/modules/bs.string/templates/concat_macros.jinja @@ -0,0 +1,4 @@ +{% include 'core/header.jinja' %} +# This file was automatically generated, do not edit +$data modify storage bs:ctx _.s.1 set value "{% for j in range(a, -1, -1) -%} +$({{ j + 1 }}){% endfor %}" diff --git a/modules/bs.time/README.md b/modules/bs.time/README.md index b47c6c7fc..9cd5db98b 100644 --- a/modules/bs.time/README.md +++ b/modules/bs.time/README.md @@ -4,7 +4,6 @@ This datapack allows you to easily retrieve system time information in Minecraft For more details and usage examples, check out the Bookshelf [documentation](https://docs.mcbookshelf.dev/en/latest/modules/time.html). - ## 📖 About Bookshelf This module is part of the [Bookshelf Project](https://docs.mcbookshelf.dev/en/latest/index.html), a modular library datapack designed to simplify complex systems in Minecraft. Explore the full range of modules and discover how Bookshelf can simplify your Minecraft creations!