ndb: sync up a few remaining NdbNote tag differences

This commit is contained in:
William Casarin
2023-07-25 16:22:25 -07:00
parent 2f8aa29e92
commit 593d0e2abe
14 changed files with 93 additions and 60 deletions

View File

@@ -15,8 +15,12 @@ struct TagSequence: Sequence {
tag.pointee.count
}
subscript(index: Int) -> NdbTagElem? {
guard index < count else { return nil }
func strings() -> [String] {
return self.map { $0.string() }
}
subscript(index: Int) -> NdbTagElem {
precondition(index < count, "Index out of bounds")
return NdbTagElem(note: note, tag: tag, index: Int32(index))
}