diff --git a/TextCase/Converters/AlternateCaseConverter.cs b/TextCase/Converters/AlternateCaseConverter.cs
index a1858cf..5971bba 100644
--- a/TextCase/Converters/AlternateCaseConverter.cs
+++ b/TextCase/Converters/AlternateCaseConverter.cs
@@ -17,7 +17,7 @@ public class AlternateCaseConverter : ICaseConverter
/// The specified text converted to alternate case.
public string Convert(string text)
{
- if (string.IsNullOrEmpty(text))
+ if (string.IsNullOrWhiteSpace(text))
{
return string.Empty;
}
diff --git a/TextCase/Converters/TitleCaseConverter.cs b/TextCase/Converters/TitleCaseConverter.cs
index 9722b6e..235c4cd 100644
--- a/TextCase/Converters/TitleCaseConverter.cs
+++ b/TextCase/Converters/TitleCaseConverter.cs
@@ -16,10 +16,9 @@ public class TitleCaseConverter : ICaseConverter
/// The specified text converted to title case.
public string Convert(string text)
{
-
- return string.IsNullOrWhiteSpace(text) ?
- string.Empty :
- text.ToTitleCase();
+ return string.IsNullOrEmpty(text) ?
+ string.Empty :
+ CultureInfo.InvariantCulture.TextInfo.ToTitleCase(text);
}
}
}
\ No newline at end of file
diff --git a/TextCase/TextCase.csproj b/TextCase/TextCase.csproj
index 6553474..ef91483 100644
--- a/TextCase/TextCase.csproj
+++ b/TextCase/TextCase.csproj
@@ -1,22 +1,18 @@
-
-
-
- net8.0
- TextCase
- 1.0.6
- Ottorino Bruni
- The TextCase library for .NET helps changing the cases of existing texts.
- true
- https://github.com/ottorinobruni/TextCase
- git
- MIT
- README.md
-
-
-
-
-
-
-
-
-
+
+
+ net8.0
+ TextCase
+ 1.0.7
+ Ottorino Bruni
+ The TextCase library for .NET helps changing the cases of existing texts.
+ true
+ https://github.com/ottorinobruni/TextCase
+ git
+ MIT
+ README.md
+
+
+
+
+
+
\ No newline at end of file