We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8f05879 + 33a1bac commit 08d133cCopy full SHA for 08d133c
stdlib/public/core/StringUTF8View.swift
@@ -78,15 +78,15 @@ extension String {
78
///
79
/// print(strncmp(s1, s2, 14))
80
/// // Prints "0"
81
- /// print(String(s1.utf8.prefix(14)))
+ /// print(String(s1.utf8.prefix(14))!)
82
/// // Prints "They call me '"
83
84
/// Extending the compared character count to 15 includes the differing
85
/// characters, so a nonzero result is returned.
86
87
/// print(strncmp(s1, s2, 15))
88
/// // Prints "-17"
89
- /// print(String(s1.utf8.prefix(15)))
+ /// print(String(s1.utf8.prefix(15))!)
90
/// // Prints "They call me 'B"
91
@frozen
92
public struct UTF8View {
0 commit comments