Skip to content

Commit 2ba93a2

Browse files
committed
Merge pull request #1300 from peterfriese/gardening-typo-nul-terminated
[gardening] Fix typo: "nul-terminated" → "null-terminated"
2 parents 7306318 + 888d0f3 commit 2ba93a2

File tree

7 files changed

+8
-8
lines changed

7 files changed

+8
-8
lines changed

include/swift/AST/Identifier.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ enum class DeclRefKind {
4848
};
4949

5050
/// Identifier - This is an instance of a uniqued identifier created by
51-
/// ASTContext. It just wraps a nul-terminated "const char*".
51+
/// ASTContext. It just wraps a null-terminated "const char*".
5252
class Identifier {
5353
friend class ASTContext;
5454
const char *Pointer;

include/swift/Parse/Lexer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class Lexer {
4848

4949
/// Pointer to one past the end character of the buffer, even in a lexer
5050
/// that scans a subrange of the buffer. Because the buffer is always
51-
/// NUL-terminated, this points to the NUL terminator.
51+
/// NULL-terminated, this points to the NUL terminator.
5252
const char *BufferEnd;
5353

5454
/// Pointer to the artificial EOF that is located before BufferEnd. Useful

stdlib/public/SDK/Foundation/NSStringAPI.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ extension String {
594594
/// `encoding`, without any allocations. Does not NULL-terminate.
595595
///
596596
/// - Parameter buffer: A buffer into which to store the bytes from
597-
/// the receiver. The returned bytes are not NUL-terminated.
597+
/// the receiver. The returned bytes are not NULL-terminated.
598598
///
599599
/// - Parameter maxBufferCount: The maximum number of bytes to write
600600
/// to buffer.

stdlib/public/core/CString.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import SwiftShims
1616

1717
extension String {
18-
/// Creates a new `String` by copying the nul-terminated UTF-8 data
18+
/// Creates a new `String` by copying the null-terminated UTF-8 data
1919
/// referenced by a `CString`.
2020
///
2121
/// Returns `nil` if the `CString` is `NULL` or if it contains ill-formed
@@ -30,7 +30,7 @@ extension String {
3030
input: UnsafeBufferPointer(start: UnsafeMutablePointer(cs), count: len))
3131
}
3232

33-
/// Creates a new `String` by copying the nul-terminated UTF-8 data
33+
/// Creates a new `String` by copying the null-terminated UTF-8 data
3434
/// referenced by a `CString`.
3535
///
3636
/// Returns `nil` if the `CString` is `NULL`. If `CString` contains

stdlib/public/core/LifetimeManager.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public func withExtendedLifetime<T, Result>(
3131
extension String {
3232

3333
/// Invoke `f` on the contents of this string, represented as
34-
/// a nul-terminated array of char, ensuring that the array's
34+
/// a null-terminated array of char, ensuring that the array's
3535
/// lifetime extends through the execution of `f`.
3636
public func withCString<Result>(
3737
@noescape f: UnsafePointer<Int8> throws -> Result

stdlib/public/core/StringUTF8.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ extension String {
247247
return _core.elementWidth == 1 ? _core.startASCII : nil
248248
}
249249

250-
/// A contiguously-stored nul-terminated UTF-8 representation of
250+
/// A contiguously-stored null-terminated UTF-8 representation of
251251
/// `self`.
252252
///
253253
/// To access the underlying memory, invoke

stdlib/public/runtime/Reflection.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ explicit String(const char *ptr)
9494
: String(ptr, strlen(ptr))
9595
{}
9696

97-
/// Create a Swift String from two concatenated nul-terminated strings.
97+
/// Create a Swift String from two concatenated null-terminated strings.
9898
explicit String(const char *ptr1, const char *ptr2) {
9999
size_t len1 = strlen(ptr1);
100100
size_t len2 = strlen(ptr2);

0 commit comments

Comments
 (0)