Skip to content

Commit d5c17c1

Browse files
committed
Fix up comment
1 parent 8f593be commit d5c17c1

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Sources/Testing/ABI/EntryPoints/EntryPoint.swift

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -353,14 +353,16 @@ extension __CommandLineArguments_v0: Codable {
353353
}
354354

355355
extension RandomAccessCollection<String> {
356-
/// Get the value of the command line argument named at the given index.
356+
/// Get the value of the command line argument with the given name.
357357
///
358358
/// - Parameters:
359359
/// - key: The key or name of the argument, e.g. `"--attachments-path"`.
360-
/// - index: Optionally, the index where `key` should be found.
360+
/// - index: The index where `key` should be found, or `nil` to search the
361+
/// entire collection.
361362
///
362-
/// - Returns: The value of the argument named by `key`. If no value is
363-
/// available, returns `nil`.
363+
/// - Returns: The value of the argument named by `key` at `index`. If no
364+
/// value is available, or if `index` is not `nil` and the argument at
365+
/// `index` is not named `key`, returns `nil`.
364366
///
365367
/// This function handles arguments of the form `--key value` and
366368
/// `--key=value`. Other argument syntaxes are not supported.

0 commit comments

Comments
 (0)