lib/strings: simplify removePrefix readability

It was discussed as a part of #2570.
lib/strings: add hasPrefix and simplify hasSuffix

It was discussed as a part of #2570.