C++ 표준 문서를 보면 .length()는 단순히 .size()를 호출하도록 설계되어 있는 경우가 많음

// 실제 LLVM(Clang)의 string 소스 코드
size_type length() const noexcept {
    return size();
}