ObjFW  Diff

Differences From Artifact [a75e75f59e]:

To Artifact [3ded5f2be1]:


40
41
42
43
44
45
46





47
48
49
50
51
52
53
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58







+
+
+
+
+







	OF_STRING_ENCODING_ASCII,
	OF_STRING_ENCODING_ISO_8859_1,
	OF_STRING_ENCODING_ISO_8859_15,
	OF_STRING_ENCODING_WINDOWS_1252,
	OF_STRING_ENCODING_AUTODETECT = 0xFF
} of_string_encoding_t;


typedef enum of_string_search_options_t {
	OF_STRING_SEARCH_BACKWARDS = 1
} of_string_search_options_t;

/* FIXME */
#define OF_STRING_ENCODING_NATIVE OF_STRING_ENCODING_UTF_8

#ifdef OF_HAVE_BLOCKS
typedef void (^of_string_line_enumeration_block_t)(OFString *line, BOOL *stop);
#endif

606
607
608
609
610
611
612
613

614
615
616
617


618
619

620
621
622

623
624

625
626


627
628


629
630
631
632
633
634
635
611
612
613
614
615
616
617

618
619
620


621
622
623

624
625
626

627
628
629
630


631
632
633

634
635
636
637
638
639
640
641
642







-
+


-
-
+
+

-
+


-
+


+
-
-
+
+

-
+
+







 * \param buffer The buffer to store the Unicode characters
 * \param range The range of the Unicode characters to copy
 */
- (void)getCharacters: (of_unichar_t*)buffer
	      inRange: (of_range_t)range;

/**
 * \brief Returns the index of the first occurrence of the string.
 * \brief Returns the range of the first occurrence of the string.
 *
 * \param string The string to search
 * \return The index of the first occurrence of the string or OF_INVALID_INDEX
 *	   if it was not found
 * \return The range of the first occurrence of the string or a range with
 *	   OF_INVALID_INDEX as start position if it was not found
 */
- (size_t)indexOfFirstOccurrenceOfString: (OFString*)string;
- (of_range_t)rangeOfString: (OFString*)string;

/**
 * \brief Returns the index of the last occurrence of the string.
 * \brief Returns the range of the string.
 *
 * \param string The string to search
 * \param options Options modifying search behaviour.
 * \return The index of the last occurrence of the string or OF_INVALID_INDEX if
 *	   it was not found
 * \return The range of the first occurrence of the string or a range with
 *	   OF_INVALID_INDEX as start position if it was not found
 */
- (size_t)indexOfLastOccurrenceOfString: (OFString*)string;
- (of_range_t)rangeOfString: (OFString*)string
		    options: (of_string_search_options_t)options;

/**
 * \brief Returns whether the string contains the specified string.
 *
 * \param string The string to search
 * \return Whether the string contains the specified string
 */