add EnsureEndsWith
This commit is contained in:
parent
d9c8d3e19a
commit
fc77a752b4
|
@ -376,5 +376,10 @@ public static class StringUtils
|
||||||
return $"{prefix}{target.TrimStart(prefix)}";
|
return $"{prefix}{target.TrimStart(prefix)}";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String EnsureEndsWith(this String target, String postfix)
|
||||||
|
{
|
||||||
|
return $"{target.TrimEnd(postfix)}{postfix}";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue