Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
MrYossu committed Mar 25, 2024
2 parents 8c98060 + 480ca5b commit 25323df
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Pixata.Extensions/Pixata.Extensions.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<Version>1.26.0</Version>
<AssemblyVersion>1.26.0</AssemblyVersion>
<FileVersion>1.26.0</FileVersion>
<Version>1.27.0</Version>
<AssemblyVersion>1.27.0</AssemblyVersion>
<FileVersion>1.27.0</FileVersion>
<Company>Pixata Ltd</Company>
<Authors>Avrohom Yisroel Silver</Authors>
<Product>Pixata.Extensions</Product>
Expand Down
2 changes: 1 addition & 1 deletion Pixata.Extensions/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ Here is a brief description of the methods in the classes so far...

`OtherLines()` - Returns all but the first line of a multi-line string. Useful for getting the second and subsequent line(s) of someone's address

`RemoveDiacritics()` - Removes diacritics (such as ð, â and ý) from letters, replacing them with their (hopefully) nearest Latin equivalents. Note that for boring technical reasons, the returned string is lowercase.
`RemoveDiacritics()` - Removes diacritics (such as ð, â and ý) from letters, replacing them with their (hopefully) nearest Latin equivalents. Note that for boring technical reasons, the returned string was lowercase in earlier versions of this package. Starting with version 1.27.0, case is preserved.
3 changes: 1 addition & 2 deletions Pixata.Extensions/StringExtensionMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,7 @@ public static class StringExtensionMethods {
public static string RemoveDiacritics(this string text) =>
string.Concat(text.Normalize(NormalizationForm.FormD).Where(ch => CharUnicodeInfo.GetUnicodeCategory(ch) != UnicodeCategory.NonSpacingMark))
.Normalize(NormalizationForm.FormC)
.ToLower()
// For some reason, the character ð isn't converted, so we have to do that one manually. I don't know how often they use it, but for the (really only a) few extra milliseconds it adds to the execution time, it will make the users happy :)
// For some reason, the character ð isn't converted, so we have to do that one manually. I don't know how often these are used, but for the (really only a) few extra milliseconds it adds to the execution time, it will make the users happy :)
// Actually, it won't make them sad, which it would if it didn't work, but it amounts to the same thing!
.Replace("ð", "o");

Expand Down

0 comments on commit 25323df

Please sign in to comment.