Diffrerence between strlen function and str.length()

what is the diffrerence between strlen function and str.length() function

strlen is used with char array.
str.length() or str.size() is used with strings.