{"id":13730167,"url":"https://github.com/skibitsky/string-formatter","last_synced_at":"2025-04-10T21:21:08.292Z","repository":{"id":98989406,"uuid":"352324087","full_name":"skibitsky/string-formatter","owner":"skibitsky","description":"👨‍👩‍👧 Format strings with HTML-like tags (Unity's Rich Text) in LINQ fashion","archived":false,"fork":false,"pushed_at":"2022-11-14T09:19:11.000Z","size":20,"stargazers_count":22,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-04T19:16:10.233Z","etag":null,"topics":["csharp","rich-text","unity","upm-package"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/skibitsky.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2021-03-28T12:32:21.000Z","updated_at":"2025-03-06T13:12:30.000Z","dependencies_parsed_at":"2024-01-06T14:49:06.136Z","dependency_job_id":"ddc506a8-ece8-4fe1-a015-3e7208c88e88","html_url":"https://github.com/skibitsky/string-formatter","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skibitsky%2Fstring-formatter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skibitsky%2Fstring-formatter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skibitsky%2Fstring-formatter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skibitsky%2Fstring-formatter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skibitsky","download_url":"https://codeload.github.com/skibitsky/string-formatter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248298960,"owners_count":21080441,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csharp","rich-text","unity","upm-package"],"created_at":"2024-08-03T02:01:10.884Z","updated_at":"2025-04-10T21:21:08.268Z","avatar_url":"https://github.com/skibitsky.png","language":"C#","funding_links":[],"categories":["C#"],"sub_categories":[],"readme":"# String Formatter [![openupm](https://img.shields.io/npm/v/com.skibitsky.string-formatter?label=openupm\u0026registry_uri=https://package.openupm.com)](https://openupm.com/packages/com.skibitsky.string-formatter/)\n\u003e Format strings with HTML-like tags (Unity's Rich Text) in LINQ fashion\n\n## Usage\n\n```csharp\n// Without String Formatter\nDebug.Log($\"Player's name: \u003ccolor=red\u003e\u003csize=16\u003e\u003ci\u003e\u003cb\u003e{name}\u003c/b\u003e\u003c/i\u003e\u003c/size\u003e\u003c/color\u003e\");\n\n// With String Formatter\nDebug.Log($\"Player's name: {name.Bold().Italic().Size(16).Red()});\n\n// Reuse\nvar nameFormat = new FormattedStringBuilder().Bold().Italic().Size(16).Red();\nDebug.Log($\"Player One name: {nameFormat.Appy(name1)});\nDebug.Log($\"Player Two name: {nameFormat.Appy(name2)});\n\n// Extend\npublic static FormattedStringBuilder Dead(this FormattedStringBuilder source)\n{\n    source.Append(\"Player \");       // Add before string. Used for opening tags\n    source.PushToEnd(\" is dead!\");  // Add after string. Used for closing tags\n    \n    return source.Bold().Italic();  // Also make string bold and italic\n}\npublic static FormattedStringBuilder Dead(this string source) =\u003e new FormattedStringBuilder(source).Dead();\n\n```\n\n## Installation\n\n### Install via OpenUPM\n\nThe package is available on the [openupm registry](https://openupm.com). It's recommended to install it via [openupm-cli](https://github.com/openupm/openupm-cli).\n\n```\nopenupm add com.skibitsky.string-formatter\n```\n\n### Install via Git URL\n\nOpen *Packages/manifest.json* with your favorite text editor. Add the following line to the dependencies block.\n\n    {\n        \"dependencies\": {\n            \"com.skibitsky.string-formatter\": \"https://github.com/skibitsky/string-formatter.git\"\n        }\n    }\n\nNotice: Unity Package Manager records the current commit to a lock entry of the *manifest.json*. To update to the latest version, change the hash value manually or remove the lock entry to resolve the package.\n\n    \"lock\": {\n      \"com.skibitsky.string-formatter\": {\n        \"revision\": \"master\",\n        \"hash\": \"...\"\n      }\n    }\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskibitsky%2Fstring-formatter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskibitsky%2Fstring-formatter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskibitsky%2Fstring-formatter/lists"}