{"id":149474,"date":"2026-06-09T02:47:46","date_gmt":"2026-06-08T23:47:46","guid":{"rendered":"https:\/\/vpesports.com\/minecraft\/mods\/string-utilities\/"},"modified":"2026-06-09T02:47:46","modified_gmt":"2026-06-08T23:47:46","slug":"string-utilities","status":"publish","type":"mod","link":"https:\/\/vpesports.com\/minecraft\/mods\/string-utilities\/","title":{"rendered":"String Utilities"},"content":{"rendered":"<p># String Utilities Mod<br \/>\nA mod that provides more NBT string operations.<br \/>\n\u4e00\u4e2a\u63d0\u4f9b\u66f4\u591a NBT \u5b57\u7b26\u4e32\u64cd\u4f5c\u7684\u6a21\u7ec4\u3002<\/p>\n<p>## Syntax \u8bed\u6cd5<br \/>\n`\/string <method> [target] [source&#8230;]`<\/p>\n<p>The `target` and `source` parts are similar to what follows the `data modify` command.<br \/>\n`target`\u548c`source`\u90e8\u5206\u4e0e`data modify`\u547d\u4ee4\u540e\u9762\u7684\u90e8\u5206\u7c7b\u4f3c\u3002<\/p>\n<p>## Example \u4f8b\u5b50<br \/>\n&#8211; `\/string isEmpty value &#8220;&#8221;` returns 1<br \/>\n&#8211; `\/string indexOf value &#8220;asdfghjkl&#8221; value &#8220;qwerty&#8221;` returns -1<br \/>\n&#8211; `\/string escape storage a:b c value &#8221;quote&#8221;slash\\&#8217;` stores `&#8217;quote&#8221;slash\\` into `a:b\/c`<br \/>\n&#8211; `\/string strip storage foo:bar baz value &#8221;  a 123   &#8220;` stores `a 123` into `foo:bar\/baz`<br \/>\n&#8211; `\/string concat2 storage a b from entity @s SelectedItem.id from entity @s Inventory[0].id`<br \/>\n&#8211; `\/string join storage test playerUUID from value &#8220;~&#8221; from @s UUID`<\/p>\n<p>## Available Methods \u53ef\u7528\u7684\u65b9\u6cd5<br \/>\n| Name                       | Source                                          | Target                               | Return Value                                                                                   |<br \/>\n|&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-|&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-|&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;|&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;|<br \/>\n| `isBlank`                  | `String`                                        | &#8211;                                    | `1` if the input is a blank string, `0` otherwise.                                             |<br \/>\n| `isEmpty`                  | `String`                                        | &#8211;                                    | `1` if the input is a empty string, `0` otherwise.                                             |<br \/>\n| `length`                   | `String`                                        | &#8211;                                    | String length.                                                                                 |<br \/>\n| `toString`                 | Any NBT Element                                 | `String`                             | String length.                                                                                 |<br \/>\n| `toJson`                   | Any NBT Element                                 | `String`                             | String length.                                                                                 |<br \/>\n| `escape`                   | `String`                                        | `String`                             | String length.                                                                                 |<br \/>\n| `escapeNbt`                | `String`                                        | `String`                             | String length.                                                                                 |<br \/>\n| `escapeRegex`              | `String`                                        | `String`                             | String length.                                                                                 |<br \/>\n| `toLowerCase`              | `String`                                        | `String`                             | String length.                                                                                 |<br \/>\n| `toUpperCase`              | `String`                                        | `String`                             | String length.                                                                                 |<br \/>\n| `toLowerCaseInvariant`     | `String`                                        | `String`                             | String length.                                                                                 |<br \/>\n| `toUpperCaseInvariant`     | `String`                                        | `String`                             | String length.                                                                                 |<br \/>\n| `strip`                    | `String`                                        | `String`                             | String length.                                                                                 |<br \/>\n| `stripLeading`             | `String`                                        | `String`                             | String length.                                                                                 |<br \/>\n| `stripTrailing`            | `String`                                        | `String`                             | String length.                                                                                 |<br \/>\n| `toCharArray`              | `String`                                        | `List<String>`                       | Count of code points.                                                                          |<br \/>\n| `toCodePointStrings`       | `String`                                        | `List<String>`                       | Count of code points.                                                                          |<br \/>\n| `toCodePoints`             | `String`                                        | `IntArray`                           | Count of code points.                                                                          |<br \/>\n| `fromCodePoints`           | `IntArray`                                      | `String`                             | String length.                                                                                 |<br \/>\n| `breakCharacters`          | `String`                                        | `List<String>`                       | Count of results.                                                                              |<br \/>\n| `breakCharactersInvariant` | `String`                                        | `List<String>`                       | Count of results.                                                                              |<br \/>\n| `breakLines`               | `String`                                        | `List<String>`                       | Count of results.                                                                              |<br \/>\n| `breakLinesInvariant`      | `String`                                        | `List<String>`                       | Count of results.                                                                              |<br \/>\n| `breakSentences`           | `String`                                        | `List<String>`                       | Count of results.                                                                              |<br \/>\n| `breakSentencesInvariant`  | `String`                                        | `List<String>`                       | Count of results.                                                                              |<br \/>\n| `breakWords`               | `String`                                        | `List<String>`                       | Count of results.                                                                              |<br \/>\n| `breakWordsInvariant`      | `String`                                        | `List<String>`                       | Count of results.                                                                              |<br \/>\n| `concat`                   | `List<String>`                                  | `String`                             | String length.                                                                                 |<br \/>\n| `concat2`                  | `String s0, String s1, [String s2]`             | `String`                             | String length.                                                                                 |<br \/>\n| `trim`                     | `String src, [String trimChars]`                | `String`                             | String length.                                                                                 |<br \/>\n| `trimStart`                | `String src, [String trimChars]`                | `String`                             | String length.                                                                                 |<br \/>\n| `trimEnd`                  | `String src, [String trimChars]`                | `String`                             | String length.                                                                                 |<br \/>\n| `at`                       | `String src, Int index`                         | `String`                             | Unicode code point.                                                                            |<br \/>\n| `codePointAt`              | `String src, Int index`                         | `String`                             | Unicode code point.                                                                            |<br \/>\n| `codePointBefore`          | `String src, Int index`                         | `String`                             | Unicode code point.                                                                            |<br \/>\n| `repeat`                   | `String src, Int count`                         | `String`                             | String length.                                                                                 |<br \/>\n| `matchesAll`               | `String src, String pattern`                    | `List<Compound(Int start, Int end)>` | Count of match results.                                                                        |<br \/>\n| `matchesAllFully`          | `String src, String pattern`                    | `List<Compound(Int start, Int end)>` | Count of match results.                                                                        |<br \/>\n| `join`                     | `String delimiter, List elements`               | `String`                             | String length.                                                                                 |<br \/>\n| `substring`                | `String src, Int begin, [Int end]`              | `String`                             | String length.                                                                                 |<br \/>\n| `substring2`               | `String src, Int begin, [Int length]`           | `String`                             | String length.                                                                                 |<br \/>\n| `split`                    | `String src, String separator, [Int limit]`     | `List<String>`                       | Count of splitted string parts                                                                 |<br \/>\n| `indexOf`                  | `String src, String substring, [Int fromIndex]` | `String`                             | The index of the first occurrence of the substring, or `-1` if the substring is not contained. |<br \/>\n| `lastIndexOf`              | `String src, String substring, [Int fromIndex]` | `String`                             | The index of the last occurrence of the substring, or `-1` if the substring is not contained.  |<br \/>\n| `startsWith`               | `String src, String prefix, [Int offset]`       | &#8211;                                    | `1` if the second input is a prefix of the first input, `0` otherwise.                         |<br \/>\n| `endsWith`                 | `String src, String suffix`                     | &#8211;                                    | `1` if the second input is a suffix of the first input, `0` otherwise.                         |<br \/>\n| `contains`                 | `String src, String substring`                  | &#8211;                                    | `1` if the first input contains the second input, `0` otherwise.                               |<br \/>\n| `matches`                  | `String src, String regex`                      | &#8211;                                    | `1` if the first input matches the second input, `0` otherwise.                                |<br \/>\n| `replace`                  | `String src, String target, String replacement` | `String`                             | String length.                                                                                 |<br \/>\n| `replaceAll`               | `String src, String regex, String replacement`  | `String`                             | String length.                                                                                 |<br \/>\n| `replaceFirst`             | `String src, String regex, String replacement`  | `String`                             | String length.                                                                                 |<\/p>\n<p>Note: Some methods actually accept any NBT element, but convert it to a string before processing.<br \/>\n\u6ce8\uff1a\u6709\u4e9b\u65b9\u6cd5\u5b9e\u9645\u4e0a\u63a5\u53d7\u4efb\u4f55 NBT \u5143\u7d20\uff0c\u4f46\u5728\u5904\u7406\u4e4b\u524d\u5c06\u5176\u8f6c\u6362\u4e3a\u5b57\u7b26\u4e32\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A mod that provides more NBT string operations.<\/p>\n","protected":false},"featured_media":149475,"template":"","meta":{"_minecraft_slug":"string-utilities","_minecraft_project_id":"VE8pf7zL","_minecraft_author":"Myitian","_minecraft_license":"MIT","_minecraft_downloads":870,"_minecraft_follows":0,"_minecraft_client_side":"unsupported","_minecraft_server_side":"required","_minecraft_storage_type":"zip","_minecraft_archive_name":"string-utilities.zip","_minecraft_size_bytes":430531,"_minecraft_version_count":21,"_minecraft_updated_at":"2026-05-15T19:09:03.667233Z","_minecraft_date_created":"2024-12-07T00:33:21.792753Z","_minecraft_date_modified":"2025-12-27T07:02:24.335366Z","_minecraft_project_url":"https:\/\/modrinth.com\/mod\/string-utilities","_minecraft_icon_attachment_id":149475,"_minecraft_imported_at":"2026-06-08T23:47:46+00:00","_minecraft_import_hash":"f5f42fe7ed6e4c9adaef002c930bd07a","_minecraft_versions":"","_minecraft_links":"","_minecraft_gallery":"","_minecraft_api_metadata":""},"mod_category":[97,104,158,92],"mod_loader":[99,106,160],"minecraft_version":[110,111,112,113,114,115,116,117,118,119,120,46,47,48,49,50,51,52,53,54,55,56,57,58,59,36,60,93,94,101,102,62,37,40,41,73,74,38,78,79,80,81,82],"class_list":["post-149474","mod","type-mod","status-publish","has-post-thumbnail","hentry","mod_category-fabric","mod_category-forge","mod_category-neoforge","mod_category-utility","mod_loader-fabric","mod_loader-forge","mod_loader-neoforge","minecraft_version-1-14","minecraft_version-1-14-1","minecraft_version-1-14-2","minecraft_version-1-14-3","minecraft_version-1-14-4","minecraft_version-1-15","minecraft_version-1-15-1","minecraft_version-1-15-2","minecraft_version-1-16","minecraft_version-1-16-1","minecraft_version-1-16-2","minecraft_version-1-16-3","minecraft_version-1-16-4","minecraft_version-1-16-5","minecraft_version-1-17","minecraft_version-1-17-1","minecraft_version-1-18","minecraft_version-1-18-1","minecraft_version-1-18-2","minecraft_version-1-19","minecraft_version-1-19-1","minecraft_version-1-19-2","minecraft_version-1-19-3","minecraft_version-1-19-4","minecraft_version-1-20","minecraft_version-1-20-1","minecraft_version-1-20-2","minecraft_version-1-20-3","minecraft_version-1-20-4","minecraft_version-1-20-5","minecraft_version-1-20-6","minecraft_version-1-21","minecraft_version-1-21-1","minecraft_version-1-21-10","minecraft_version-1-21-11","minecraft_version-1-21-2","minecraft_version-1-21-3","minecraft_version-1-21-4","minecraft_version-1-21-5","minecraft_version-1-21-6","minecraft_version-1-21-7","minecraft_version-1-21-8","minecraft_version-1-21-9"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>String Utilities - Minecraft<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/vpesports.com\/minecraft\/mods\/string-utilities\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"String Utilities - Minecraft\" \/>\n<meta property=\"og:description\" content=\"A mod that provides more NBT string operations.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/vpesports.com\/minecraft\/mods\/string-utilities\/\" \/>\n<meta property=\"og:site_name\" content=\"Minecraft\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/string-utilities\\\/\",\"url\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/string-utilities\\\/\",\"name\":\"String Utilities - Minecraft\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/string-utilities\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/string-utilities\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/wp-content\\\/uploads\\\/2026\\\/06\\\/string-utilities-icon-8eca53a7a091d4fc8d27b09b8418b9de9bbc0c2b.png\",\"datePublished\":\"2026-06-08T23:47:46+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/string-utilities\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/string-utilities\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/string-utilities\\\/#primaryimage\",\"url\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/wp-content\\\/uploads\\\/2026\\\/06\\\/string-utilities-icon-8eca53a7a091d4fc8d27b09b8418b9de9bbc0c2b.png\",\"contentUrl\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/wp-content\\\/uploads\\\/2026\\\/06\\\/string-utilities-icon-8eca53a7a091d4fc8d27b09b8418b9de9bbc0c2b.png\",\"width\":1024,\"height\":1024},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/string-utilities\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Mods\",\"item\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"String Utilities\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/#website\",\"url\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/\",\"name\":\"Minecraft\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"String Utilities - Minecraft","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/vpesports.com\/minecraft\/mods\/string-utilities\/","og_locale":"en_US","og_type":"article","og_title":"String Utilities - Minecraft","og_description":"A mod that provides more NBT string operations.","og_url":"https:\/\/vpesports.com\/minecraft\/mods\/string-utilities\/","og_site_name":"Minecraft","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/vpesports.com\/minecraft\/mods\/string-utilities\/","url":"https:\/\/vpesports.com\/minecraft\/mods\/string-utilities\/","name":"String Utilities - Minecraft","isPartOf":{"@id":"https:\/\/vpesports.com\/minecraft\/#website"},"primaryImageOfPage":{"@id":"https:\/\/vpesports.com\/minecraft\/mods\/string-utilities\/#primaryimage"},"image":{"@id":"https:\/\/vpesports.com\/minecraft\/mods\/string-utilities\/#primaryimage"},"thumbnailUrl":"https:\/\/vpesports.com\/minecraft\/wp-content\/uploads\/2026\/06\/string-utilities-icon-8eca53a7a091d4fc8d27b09b8418b9de9bbc0c2b.png","datePublished":"2026-06-08T23:47:46+00:00","breadcrumb":{"@id":"https:\/\/vpesports.com\/minecraft\/mods\/string-utilities\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/vpesports.com\/minecraft\/mods\/string-utilities\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/vpesports.com\/minecraft\/mods\/string-utilities\/#primaryimage","url":"https:\/\/vpesports.com\/minecraft\/wp-content\/uploads\/2026\/06\/string-utilities-icon-8eca53a7a091d4fc8d27b09b8418b9de9bbc0c2b.png","contentUrl":"https:\/\/vpesports.com\/minecraft\/wp-content\/uploads\/2026\/06\/string-utilities-icon-8eca53a7a091d4fc8d27b09b8418b9de9bbc0c2b.png","width":1024,"height":1024},{"@type":"BreadcrumbList","@id":"https:\/\/vpesports.com\/minecraft\/mods\/string-utilities\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/vpesports.com\/minecraft\/"},{"@type":"ListItem","position":2,"name":"Mods","item":"https:\/\/vpesports.com\/minecraft\/mods\/"},{"@type":"ListItem","position":3,"name":"String Utilities"}]},{"@type":"WebSite","@id":"https:\/\/vpesports.com\/minecraft\/#website","url":"https:\/\/vpesports.com\/minecraft\/","name":"Minecraft","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/vpesports.com\/minecraft\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod\/149474","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod"}],"about":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/types\/mod"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/media\/149475"}],"wp:attachment":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/media?parent=149474"}],"wp:term":[{"taxonomy":"mod_category","embeddable":true,"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod_category?post=149474"},{"taxonomy":"mod_loader","embeddable":true,"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod_loader?post=149474"},{"taxonomy":"minecraft_version","embeddable":true,"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/minecraft_version?post=149474"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}