ObjFW  Diff

Differences From Artifact [9ffc17fae1]:

  • File src/OFString+PathAdditions.h — part of check-in [7a488c3062] at 2018-03-11 00:37:56 on branch trunk — OFString: Move path handling into a category

    This is the first step to have different versions of those for different
    operating systems, rather than #ifdefs everywhere.

    This also has the nice side-effect of not having one implementation in
    OFString and another one in OFString_UTF8 anymore. The one in OFString
    was a generic version, while the one in OFString_UTF8 was one optimized
    for UTF-8 strings. Now only the version optimized for UTF-8 strings
    exists, as this is by far the most common string implementation used,
    and the overhead of converting from something else to UTF-8 is not more
    than converting to UTF-32. (user: js, size: 2237) [annotate] [blame] [check-ins using]

To Artifact [4fb51bf901]:


24
25
26
27
28
29
30





31
32
33
34
35
36
37
#endif
extern int _OFString_PathAdditions_reference;
#ifdef __cplusplus
}
#endif

@interface OFString (PathAdditions)





/*!
 * @brief The components of the string when interpreted as a path.
 */
@property (readonly, nonatomic) OFArray OF_GENERIC(OFString *) *pathComponents;

/*!
 * @brief The last path component of the string when interpreted as a path.







>
>
>
>
>







24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#endif
extern int _OFString_PathAdditions_reference;
#ifdef __cplusplus
}
#endif

@interface OFString (PathAdditions)
/*!
 * @brief Whether the path is an absolute path.
 */
@property (readonly, nonatomic, getter=isAbsolutePath) bool absolutePath;

/*!
 * @brief The components of the string when interpreted as a path.
 */
@property (readonly, nonatomic) OFArray OF_GENERIC(OFString *) *pathComponents;

/*!
 * @brief The last path component of the string when interpreted as a path.