std::string length() and size() member functions

前端 未结 4 669
你的背包
你的背包 2020-11-29 15:43

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()

4条回答
  •  一向
    一向 (楼主)
    2020-11-29 16:08

    When using coding practice tools(LeetCode) it seems that size() is quicker than length() (although basically negligible)

提交回复
热议问题