{"id":25195945,"url":"https://github.com/simplisticated/wordy-for-net","last_synced_at":"2025-05-08T17:04:20.051Z","repository":{"id":140530626,"uuid":"150480504","full_name":"simplisticated/Wordy-for-NET","owner":"simplisticated","description":"String processor for .NET","archived":false,"fork":false,"pushed_at":"2018-10-06T16:37:11.000Z","size":114,"stargazers_count":42,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-08T17:04:02.955Z","etag":null,"topics":["csharp","dotnet-framework","processing","string"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simplisticated.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,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-09-26T19:37:05.000Z","updated_at":"2023-09-08T17:45:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"26383308-66e1-4b81-a007-e3ebaa312f70","html_url":"https://github.com/simplisticated/Wordy-for-NET","commit_stats":null,"previous_names":["igormatyushkin014/wordy-for-net"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplisticated%2FWordy-for-NET","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplisticated%2FWordy-for-NET/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplisticated%2FWordy-for-NET/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplisticated%2FWordy-for-NET/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simplisticated","download_url":"https://codeload.github.com/simplisticated/Wordy-for-NET/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253112072,"owners_count":21856070,"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","dotnet-framework","processing","string"],"created_at":"2025-02-10T01:39:11.207Z","updated_at":"2025-05-08T17:04:20.040Z","avatar_url":"https://github.com/simplisticated.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\" \u003e\n\t\u003cimg src=\"/Images/logo_2048_600.png\" alt=\"Wordy\" title=\"Wordy\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\t\u003ca href=\"https://http://www.android.com\"\u003e\n\t\t\u003cimg src=\"https://img.shields.io/badge/.net framework-4.6.1-blue.svg?style=flat\"\u003e\n\t\u003c/a\u003e\n\t\u003ca href=\"https://http://www.android.com\"\u003e\n\t\t\u003cimg src=\"https://img.shields.io/badge/nuget-1.0-blue.svg?style=flat\"\u003e\n\t\u003c/a\u003e\n\t\u003ca href=\"https://tldrlegal.com/license/apache-license-2.0-(apache-2.0)\"\u003e\n\t\t\u003cimg src=\"https://img.shields.io/badge/License-Apache 2.0-blue.svg?style=flat\"\u003e\n\t\u003c/a\u003e\n\u003c/p\u003e\n\n## At a Glance\n\n`Wordy` is a powerful text processor that provides an easy way to manage content in `String` object.\n\n## How to Get Started\n\nUse `NuGet`.\n\n## Requirements\n\n.NET Framework 4.6.1.\n\n## Usage\n\nEverything starts with `UseWordyTo` prefix. This is your entry point to all tools provided by the library.\n\n### Text Effects\n\nLet's start with a very simple example of text effect:\n\n```c#\nstring filteredText = UseWordyTo.MakeEffects(\"Hi!\")\n    .Apply(new InversionEffect())\n    .GetResult();\n\nConsole.WriteLine(filteredText); // \"!iH\"\n```\n\nThis is how it works: `UseWordyTo.MakeEffects(...)` gives you an `EffectManager` instance configured for your source text. Then, you can apply some effects and retrieve the final text by `.GetResult()` call.\n\nIn the example above, the `InversionEffect` will be applied to the entire string. The same time, you can apply effect to a particular substring:\n\n```c#\nString filteredText = UseWordyTo.MakeEffects(\"Hi!\")\n    .Apply(new InversionEffect(), 0, 1) // Start index is 0, end index is 1\n    .GetResult();\n\nConsole.WriteLine(filteredText); // \"iH!\"\n```\n\nYou can add as many effects as you want:\n\n```c#\nString filteredText = UseWordyTo.MakeEffects(\"This text will be rotated\")\n    .Apply(new RotationEffect(TextRotation.Inverted))\n    .Apply(new InversionEffect())\n    .GetResult();\n\nConsole.WriteLine(filteredText); // \"рǝʇɐʇоɹ ǝq llıм ʇxǝʇ sıɥʇ\"\n```\n\n#### Case Effect\n\nRepresented by `CaseEffect` class. Changes case for the entire text or letters at particular positions.\n\nConstructor example:\n\n```c#\nnew CaseEffect(TextCase.FirstUpperNextLower)\n```\n\n[`TextCase`](#text-case) is the only setting that defines `CaseEffect`'s behavior.\n\n#### Rotation Effect\n\nRepresented by `RotationEffect` class. Rotates letters. For example,\n\n`p` becomes `d`\n\nand\n\n`h` becomes `ɥ`.\n\n`RotationEffect` has two available constructors. The most detailed version of constructor:\n\n```c#\nnew RotationEffect(TextRotation.Inverted, true)\n```\n\nThe first parameter is a [`TextRotation`](#text-rotation) value that defines the way to rotate symbols.\n\nThe second parameter of boolean type defines whether the rotation alrorithm should be case sensitive. If it equals to `false`, some uppercased symbols might become lowercased as a result of rotation.\n\nThe second constructor is a simplified version of the first one:\n\n```c#\nnew RotationEffect(TextRotation.Inverted)\n```\n\nIt's case sensitive by default. Usually, it's enough to use the second constructor excepting cases when you need more flexibility.\n\n#### Inversion Effect\n\nRepresented by `InversionEffect` class. Flips text from right to left, so\n\n`Hi!`\n\nturns into\n\n`!iH`\n\n`InversionEffect`'s constructor is very simple and doesn't require any parameters:\n\n```c#\nnew InversionEffect()\n```\n\n### Transliteration\n\nExample of transliteration:\n\n```c#\nString transliterated = UseWordyTo.Transliterate\n(\n    Language.Russian,    // from Russian\n    Language.English     // to English\n).GetText(\"Привет!\");\n\nConsole.WriteLine(transliterated); // \"Privet!\", which means \"Hi!\"\n```\n\nCurrently supported languages are:\n\n- English\n- Russian\n\n### Options\n\n#### Text Case\n\n`TextCase` is used as a setting for `CaseEffect` instance. Available values are:\n\n- `AllUpper`: Makes the entire text uppercased.\n- `AllLower`: Makes the entire text lowercased.\n- `FirstUpperNextLower`: First symbol is uppercased, other text is lowercased.\n- `FirstLowerNextUpper`: First symbol is lowercased, other text is uppercased.\n- `AlternatingFirstUpperCase`: Odd symbols are uppercased, even symbols are lowercased.\n- `AlternatingFirstLowerCase`: Odd symbols are lowercased, even symbols are uppercased.\n\n#### Text Rotation\n\n`TextRotation` defines the conditions of symbol rotation. Available values:\n\n- `Normal`: Forces all symbols to be rotated to normal position. It means that `ʎ` would become `y` and `h` would stay `h`.\n- `UpsideDown`: Forces all symbols to be rotated upside down. In this case, `y` would turn into `ʎ`, but `ɥ` wouldn't change at all.\n- `Inverted`: Normal symbols are forced to be rotated meanwhile rotated symbols become normal. So, `y` becomes `ʎ` and `ɥ` turns into `h`.\n\n#### Language\n\nThe `Language` type is used for transliterations. Possible values:\n\n- `English`\n- `Russian`\n\n### Plugins\n\nYou can extend the functionality of `Wordy` without making changes to the library. Instead of sending pull request, simply create your own plugin.\n\nEach plugin is a subclass of the abstract class named `Plugin`. Take a look at the example below:\n\n```c#\nclass Repeat : Plugin\n{\n    public Repeat(string sourceText) : base(sourceText)\n    {\n    }\n\n    public override string GetResult()\n    {\n        return this.SourceText + this.SourceText;\n    }\n}\n```\n\nThis is a plugin that repeats the source text two times. All that you need to implement is:\n\n- overrided constructor that takes `sourceText` parameter of `String` type;\n- `GetResult()` method that returns `String` with filtered text.\n\nThe core of your plugin's implementation is the `GetResult()` method, inside of which you can implement any logic. To access the source text, simply use `this.SourceText`.\n\nNow let's try to use the plugin:\n\n```c#\nString repeatedText = UseWordyTo.IntegratePlugin\u003cRepeat\u003e(\"Test.\")\n    .GetResult();\nConsole.WriteLine(repeatedText); // \"Test.Test.\"\n```\n\nAs you can see, creating and using plugins for `Wordy` is quite easy. You can publish your plugins as separate library or send as a pull request if you want it to be included in the library after reviewal process.\n\n## License\n\n`Wordy` is available under the Apache 2.0 license. See the [LICENSE](./LICENSE) file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimplisticated%2Fwordy-for-net","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimplisticated%2Fwordy-for-net","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimplisticated%2Fwordy-for-net/lists"}