Ad
  • Custom User Avatar

    OP solved it, closing

  • Custom User Avatar

    I was talking about .capacity, not the other one.

  • Custom User Avatar

    but I want complete this code by this method

    Why? There is really no reason to do that. I've never seen that method ever used in any kata, for obvious reasons (if you read its documentation). It probably has its uses elsewhere.

  • Custom User Avatar

    No need to repeat the same question. Capacity might not work as you expect (for example it returns 15 for "abc"). There are other better methods for that purpose.