makeIterator
Attributes.swift:302func makeIterator() -> AnyIterator<Attribute>
func makeIterator() -> AnyIterator<Attribute>
s9SwiftSoup10AttributesC12makeIterators03AnyE0VyAA9AttributeCGyF
What are these?5FCHI
import SwiftSoup
class Attributes
The attributes of an Element.
@frozen struct AnyIterator<Element>
A type-erased iterator of Element
.
class Attribute
init()
static var dataPrefix: [UInt8]
func addAll(incoming: Attributes?)
Add all the attributes from the incoming set to this set.
func asList() -> [Attribute]
Get the attributes as a List, for iteration. Do not modify the keys of the attributes via this view, as changes to keys will not be recognised in the containing set.
func clone() -> Attributes
func copy(with zone: NSZone? = nil) -> Any
func dataset() -> [String : String]
Retrieves a filtered view of attributes that are HTML5 custom data attributes; that is, attributes with keys starting with {@code data-}.
func equals(o: AnyObject?) -> Bool
Checks if these attributes are equal to another set of attributes, by comparing the two sets
func get(key: String) -> String
Get an attribute value by key.
func get(key: [UInt8]) -> [UInt8]
func getIgnoreCase(key: String) throws -> String
Get an attribute’s value by case-insensitive key
func getIgnoreCase(key: [UInt8]) throws -> [UInt8]
func hasKey(key: String) -> Bool
Tests if these attributes contain an attribute with this key.
func hasKey(key: [UInt8]) -> Bool
func hasKeyIgnoreCase(key: String) -> Bool
Tests if these attributes contain an attribute with this key.
func hasKeyIgnoreCase<T>(key: T) -> Bool where T : Collection, T.Element == UInt8
func html() throws -> String
Get the HTML representation of these attributes.
func html(accum: StringBuilder, out: OutputSettings) throws
func htmlUTF8() throws -> [UInt8]
Get the HTML representation of these attributes.
func lowercaseAllKeys()
func put(_ key: String, _ value: String) throws
func put(_ key: [UInt8], _ value: [UInt8]) throws
Set a new attribute, or replace an existing one by key.
func put(_ key: [UInt8], _ value: Bool) throws
Set a new boolean attribute, remove attribute if value is false.
func put(attribute: Attribute)
Set a new attribute, or replace an existing one by (case-sensitive) key.
func remove(key: String) throws
Remove an attribute by key. Case sensitive.
func remove(key: [UInt8]) throws
func removeIgnoreCase(key: [UInt8]) throws
Remove an attribute by key. Case insensitive.
func size() -> Int
Get the number of attributes in this set.
func toString() throws -> String