I was reading the answers for this question and found that there is actually a method called length() for std::string (I always used size()>
length()
std::string
size()>
When using coding practice tools(LeetCode) it seems that size() is quicker than length() (although basically negligible)