FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Update Remove-StringDiacritic.ps1 by dkabal14 · Pull Request #37 · lazywinadmin/PowerShell · GitHub

Update Remove-StringDiacritic.ps1 - #37

Open
dkabal14 wants to merge 1 commit into
lazywinadmin:masterfrom
dkabal14:patch-1
Open

Update Remove-StringDiacritic.ps1#37
dkabal14 wants to merge 1 commit into
lazywinadmin:masterfrom
dkabal14:patch-1

Conversation

Copy link
Copy Markdown

I added a way to run the function in objects, so you can bulk remove diacritics from any powershell object, even imported CSV and JSON files

I added a way to run the function in objects, so you can bulk remove diacritics from any powershell object, even imported CSV and JSON files

Copy link
Copy Markdown

I added a section to replace the upside down ? and ! used in Spanish and a section to remove extra spaces, can you include this in your official version?
# Normalize the String
$Normalized = $StringValue.Normalize($NormalizationForm)
# Replace the special punctuation characters
$Normalized = $Normalized.Replace("¿", "?")
$Normalized = $Normalized.Replace("¡", "!")
# Remove extra spaces
$Normalized = $Normalized -replace '\s{2,}', ' '

$NewString = New-Object -TypeName System.Text.StringBuilder

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL