title: does swift's string type conform to collection protocol?
body: <p>In the swift programming language book, it states </p>
  
  <blockquote>
    <p>You can use the startIndex and endIndex properties and the
    index(before:), index(after:), and index(_:offsetBy:) methods on any
    type that conforms to the Collection protocol. This includes String,
    as shown here, as well as collection types such as Array, Dictionary,
    and Set.</p>
  </blockquote>
  
  <p>However, I have checked the apple documentation on swift's string api, which does not indicate that <code>String</code> type conform to <code>Collection</code> protocol</p>
  
  <p><a href="https://i.stack.imgur.com/ZaZwR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZaZwR.png" alt="enter image description here"></a></p>
  
  <p>I must be missing something here, but can't seem to figure it out. </p>