I have some tests that check strings that are displayed to the user.
I don’t wish the test to fail to due to changes in the indentations or line breaks etc. So I am looking for something like a string compare that.
- Ignore while space as the start of the string (easy use string.trim)
- When any number of any type of white space that is next to each other matches in the same way as if it was a single space.
I could start to create a regex, but someone else may have a better solution hence this question.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…