Browse Source

Fix AbpStringExtensions

For now, `"".RemovePreFix("x")` will return null.
It's not a expected result. I think we shouldn't make empty string be null when trim prefix or postfix.
pull/6705/head
PM Extra 6 years ago
committed by GitHub
parent
commit
b24f080b2a
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      framework/src/Volo.Abp.Core/System/AbpStringExtensions.cs

4
framework/src/Volo.Abp.Core/System/AbpStringExtensions.cs

@ -133,7 +133,7 @@ namespace System
{
if (str.IsNullOrEmpty())
{
return null;
return str;
}
if (postFixes.IsNullOrEmpty())
@ -174,7 +174,7 @@ namespace System
{
if (str.IsNullOrEmpty())
{
return null;
return str;
}
if (preFixes.IsNullOrEmpty())

Loading…
Cancel
Save