| | | |------------------|-----------------| |Previous ID | SR-11355 | |Radar | None | |Original Reporter | yonilevy (JIRA User) | |Type | Bug | <details> <summary>Environment</summary> - Swift 5 - Xcode 10.3 - MacOS 10.14.6 </details> <details> <summary>Additional Detail from JIRA</summary> | | | |------------------|-----------------| |Votes | 1 | |Component/s | Standard Library | |Labels | Bug | |Assignee | None | |Priority | Medium | md5: 5026fff9c23d99a0d147ad5d53b56b68 </details> **Issue Description:** This is pretty self explanatory: ``` swift let str = "bar" if str.range(of: "r\u{0}")!.upperBound > str.endIndex { print("Weird!") } ``` I'd expect: 1) the \`str.range()\` to return \`nil\` 2) \`str.range()\` to never return a range outside \`str\` boundaries