🖥️How to use
How do I use this library?
This library contains a plethora of features that allow you to manipulate with or generate text. They are intended to improve your productivity and accelerate your text generation.
The following features are available in Textify.Data.Analysis
:
The following features are available in the base Textify library:
✅pageSpace Analysis and Correction📅pageSemantic Versioning👨🦽pageAccessibility ToolsFor general usage of the text manipulation library, you can use the TextTools
class to get access to various string manipulators. This class is found in the Textify.General
namespace. Additionally, the JSON tools can be found in the JsonTools
class (found in the Textify.Json
namespace) to get access to various JSON tools, such as getting a difference between two JSON objects.
In addition to the general text tools, you can also use the regular expression tools found under the Textify.Tools
namespace.
String syntax attribute
First introduced in .NET 7, you can use the string syntax attribute, called StringSyntaxAttribute
, to give your strings in the function context, but it's only available in the source code level. This depends on your IDE and how it supports this attribute.
Here's a simple example of how to use it:
You can use this syntax attribute in not only .NET 7.0+ apps, but you can also use it in .NET Standard and .NET Framework applications.
When trying to use this attribute in .NET 7.0+ apps while using Textify, you'll notice this error message appearing in the error list:
This is intentional, because Visual Studio only highlights the string based on context defined by this attribute when it is found in the System.Diagnostics.CodeAnalysis
namespace.
To solve this error, you must make an alias of the Textify.Offline
NuGet package by clicking on the Properties button in the right-click menu of the package and writing global, TextifyAlias
to the Aliases
property. Then, write the extern alias statement at the top of the source code file and modify the using
statement for the CodeAnalysis
namespace, such as:
After that, you should be able to use this attribute.
If everything works properly, you should be able to see that parts of your string, such as regex in the below screenshot, are highlighted in different colors, and warnings should work, too.
Last updated