https://github.com/filipe11402/futils-strings
String Formatting Extensions
https://github.com/filipe11402/futils-strings
dotnet strings strings-manipulation
Last synced: about 1 month ago
JSON representation
String Formatting Extensions
- Host: GitHub
- URL: https://github.com/filipe11402/futils-strings
- Owner: filipe11402
- Created: 2022-02-08T22:57:16.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-05-21T14:36:43.000Z (about 4 years ago)
- Last Synced: 2025-01-24T12:17:42.579Z (over 1 year ago)
- Topics: dotnet, strings, strings-manipulation
- Language: C#
- Homepage: https://www.nuget.org/packages/FUtils.Strings/
- Size: 26.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# String Formatting Library
Format your strings using these Extension Methods
---
## Documentation
#### .NET CLI
```
dotnet add package FUtils.Strings
```
#### Nuget
```
Install-Package FUtils.Strings
```
#### String Extensions
**ToPascalCase()**
```cs
var myStringNonPascalCase = "hello-there";
// returns HelloThere
var myPascalCaseString = myStringNonPascalCase.ToPascalCase();
```
**CapitalizeFirstLetter()**
```cs
var myNonCapitalizedString = "hellomate";
// returns Hellomate
var capitalizedString = myNonCapitalizedString.CapitalizeFirstLetter();
```
**RemoveWhiteSpaces()**
```cs
var myWhiteSpaceString = "hello my friend";
// returns hellomate
var noWhiteSpacesString = myWhiteSpaceString.RemoveWhiteSpaces();
```
#### Exceptions
**ArgumentNullException**
Throws ArgumentNullException With the message ``` ValueCannotBeNull ```
```cs
var string = ""; //also if string " " or null
string.RemoveWhiteSpaces();
string.CapitalizeFirstLetter();
string.RemoveWhiteSpaces();
```