40 const URL *
this = (
URL *) self;
67 const URL *
this = (
URL *) self;
77 const URL *
this = (
URL *) self;
93 const URL *
this = (
URL *) self;
94 const URL *that = (
URL *) other;
148 Range *scheme = &ranges[1];
149 Range *host = &ranges[2];
150 Range *port = &ranges[3];
151 Range *path = &ranges[4];
152 Range *query = &ranges[5];
153 Range *fragment = &ranges[6];
162 self->
port = strtoul(s, NULL, 10);
215#pragma mark - Class lifecycle
233 _re =
re(
"([a-z]+)://([^:/\?]+)?(:[0-9]+)?(/[^\?#]+)?([^#]+)?(#.*)?", 0);
256 .instanceSize =
sizeof(
URL),
257 .interfaceOffset = offsetof(
URL, interface),
258 .interfaceSize =
sizeof(URLInterface),
ident release(ident obj)
Atomically decrement the given Object's reference count. If the resulting reference count is 0,...
Class * _initialize(const ClassDef *def)
Initializes the given Class.
#define alloc(type)
Allocate and initialize and instance of type.
#define super(type, obj, method,...)
Extended POSIX regular expressions.
static void destroy(Class *clazz)
static void initialize(Class *clazz)
Uniform Resource Locators (RFC 3986).
#define do_once(once, block)
Executes the given block at most one time.
ClassDefs are passed to _initialize via an archetype to initialize a Class.
The runtime representation of a Class.
ident interface
The interface of the Class.
Condition * init(Condition *self)
Initializes this Condition.
void appendString(MutableString *self, const String *string)
Appends the specified String to this MutableString.
MutableString * initWithString(MutableString *self, const String *string)
Initializes this MutableString with the contents of string.
void appendFormat(MutableString *self, const char *fmt,...)
Appends the specified formatted string.
MutableString * string(void)
Returns a new MutableString.
Object is the root Class of The Objectively Class hierarchy.
Class * clazz
Every instance of Object begins with a pointer to its Class.
Class * _Object(void)
The Object archetype.
Object * copy(const Object *self)
Creates a shallow copy of this Object.
String * description(const Object *self)
_Bool isEqual(const Object *self, const Object *other)
Tests equality of the other Object.
int hash(const Object *self)
void dealloc(Object *self)
Frees all resources held by this Object.
A location and length into contiguous collections.
ssize_t location
The location.
Extended POSIX regular expressions.
_Bool matchesCharacters(const Regexp *self, const char *chars, int options, Range **matches)
Matches this regular expression against the given characters.
OBJECTIVELY_EXPORT Regexp * re(const char *pattern, int options)
A convenience function for instantiating Regexps.
char * chars
The backing null-terminated UTF-8 encoded character array.
Array * componentsSeparatedByCharacters(const String *self, const char *chars)
Returns the components of this String that were separated by chars.
String * initWithCharacters(String *self, const char *chars)
Initializes this String by copying chars.
String * substring(const String *string, const Range range)
Creates a new String from a subset of this one.
Uniform Resource Locators (RFC 3986).
unsigned short port
The port.
URL * baseURL(const URL *self)
Array * pathComponents(const URL *self)
String * urlString
The URL String.
String * scheme
The scheme, or protocol.
String * fragment
The fragment.
URL * initWithCharacters(URL *self, const char *chars)
Initializes this URL with the specified characters.
Class * _URL(void)
The URL archetype.