Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/filipe11402/futils-strings

String Formatting Extensions
https://github.com/filipe11402/futils-strings

dotnet strings strings-manipulation

Last synced: 4 days ago
JSON representation

String Formatting Extensions

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();
```