Documented the constants for the String+Formats extension in the library target.

This commit is contained in:
Javier Cicchelli 2025-03-05 00:17:04 +01:00
parent 94f060a55e
commit 9154009f6e
2 changed files with 14 additions and 9 deletions

View File

@ -1,9 +0,0 @@
extension String {
enum Format {
enum Path {
static let data = "/data/%@"
static let docs = "/docs/%@"
static let root = "/%@"
}
}
}

View File

@ -0,0 +1,14 @@
extension String {
/// A namespace that defines the format patterns used to generate strings.
enum Format {
/// A namespace that defines the format patterns used to generate relative path representations.
enum Path {
/// A representation of the format pattern used to generate relative paths that starts with the `/data` string.
static let data = "/data/%@"
/// A representation of the format pattern used to generate relative paths that starts with the `/docs` string.
static let docs = "/docs/%@"
/// A representation of the format pattern used to generate relative paths that starts with the `/` string.
static let root = "/%@"
}
}
}