Which is more efficient for the compiler and the best practice for checking whether a string is blank?
- Checking whether the length of the string == 0
- Checking whether the string is empty (strVar == "")
Also, does the answer depend on language?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…