ObjFW  Diff

Differences From Artifact [d43c26adbd]:

To Artifact [727e3bcb81]:


74
75
76
77
78
79
80
81

82
83
84
85
86
87
88
74
75
76
77
78
79
80

81
82
83
84
85
86
87
88







-
+







 * @param line The current line
 * @param stop A pointer to a variable that can be set to true to stop the
 *	       enumeration
 */
typedef void (^of_string_line_enumeration_block_t)(OFString *line, bool *stop);
#endif

@class OFArray;
@class OFArray OF_GENERIC(ObjectType);
@class OFURL;

/*!
 * @class OFString OFString.h ObjFW/OFString.h
 *
 * @brief A class for handling strings.
 */
322
323
324
325
326
327
328
329

330
331
332
333
334
335
336
322
323
324
325
326
327
328

329
330
331
332
333
334
335
336







-
+








/*!
 * @brief Creates a path from the specified path components.
 *
 * @param components An array of components for the path
 * @return A new autoreleased OFString
 */
+ (OFString*)pathWithComponents: (OFArray*)components;
+ (OFString*)pathWithComponents: (OFArray OF_GENERIC(OFString*)*)components;

/*!
 * @brief Initializes an already allocated OFString from a UTF-8 encoded C
 *	  string.
 *
 * @param UTF8String A UTF-8 encoded C string to initialize the OFString with
 * @return An initialized OFString
879
880
881
882
883
884
885

886

887
888
889
890
891
892
893
894
895
896
897
898

899
900


901
902
903
904
905
906
907

908
909
910
911
912
913
914
879
880
881
882
883
884
885
886

887
888
889
890
891
892
893
894
895
896
897
898
899
900


901
902
903
904
905
906
907
908

909
910
911
912
913
914
915
916







+
-
+












+
-
-
+
+






-
+








/*!
 * @brief Separates an OFString into an OFArray of OFStrings.
 *
 * @param delimiter The delimiter for separating
 * @return An autoreleased OFArray with the separated string
 */
- (OFArray OF_GENERIC(OFString*)*)componentsSeparatedByString:
- (OFArray*)componentsSeparatedByString: (OFString*)delimiter;
    (OFString*)delimiter;

/*!
 * @brief Separates an OFString into an OFArray of OFStrings.
 *
 * @param delimiter The delimiter for separating
 * @param options Options according to which the string should be separated.@n
 *		  Possible values are:
 *		  Value                  | Description
 *		  -----------------------|----------------------
 * 		  `OF_STRING_SKIP_EMPTY` | Skip empty components
 * @return An autoreleased OFArray with the separated string
 */
- (OFArray OF_GENERIC(OFString*)*)
- (OFArray*)componentsSeparatedByString: (OFString*)delimiter
				options: (int)options;
    componentsSeparatedByString: (OFString*)delimiter
			options: (int)options;

/*!
 * @brief Returns the components of the path.
 *
 * @return The components of the path
 */
- (OFArray*)pathComponents;
- (OFArray OF_GENERIC(OFString*)*)pathComponents;

/*!
 * @brief Returns the last component of the path.
 *
 * @return The last component of the path
 */
- (OFString*)lastPathComponent;