ObjFW
Loading...
Searching...
No Matches
OFString.h File Reference
#include "objfw-defs.h"
#include <stdarg.h>
#include <stdint.h>
import "OFObject.h"
import "OFJSONRepresentation.h"
import "OFMessagePackRepresentation.h"
import "OFConstantString.h"
import "OFMutableString.h"
import "OFString+CryptographicHashing.h"
import "OFString+JSONParsing.h"
import "OFString+PathAdditions.h"
import "OFString+PercentEncoding.h"
import "OFString+PropertyListParsing.h"
import "OFString+XMLEscaping.h"
import "OFString+XMLUnescaping.h"

Go to the source code of this file.

Classes

class  OFString
 A class for handling strings. More...
 

Typedefs

typedef void(^ OFStringLineEnumerationBlock) (OFString *line, bool *stop)
 A block for enumerating the lines of a string.
 

Enumerations

enum  OFStringEncoding {
  OFStringEncodingUTF8 , OFStringEncodingASCII , OFStringEncodingISO8859_1 , OFStringEncodingISO8859_2 ,
  OFStringEncodingISO8859_3 , OFStringEncodingISO8859_15 , OFStringEncodingWindows1251 , OFStringEncodingWindows1252 ,
  OFStringEncodingCodepage437 , OFStringEncodingCodepage850 , OFStringEncodingCodepage858 , OFStringEncodingMacRoman ,
  OFStringEncodingKOI8R , OFStringEncodingKOI8U , OFStringEncodingWindows1250 , OFStringEncodingCodepage852 ,
  OFStringEncodingAutodetect = -1
}
 The encoding of a string. More...
 
enum  OFStringSearchOptions { OFStringSearchBackwards = 1 }
 Options for searching in strings. More...
 
enum  OFStringSeparationOptions { OFStringSkipEmptyComponents = 1 }
 Options for separating strings. More...
 

Functions

OFStringEncoding OFStringEncodingParseName (OFString *name)
 Parses the specified string encoding name and returns the OFStringEncoding for it.
 
OFStringOFStringEncodingName (OFStringEncoding encoding)
 Returns the name of the specified OFStringEncoding.
 
size_t OFUTF16StringLength (const OFChar16 *string)
 Returns the length of the specified UTF-16 string.
 
size_t OFUTF32StringLength (const OFChar32 *string)
 Returns the length of the specified UTF-32 string.
 

Typedef Documentation

◆ OFStringLineEnumerationBlock

typedef void(^ OFStringLineEnumerationBlock) (OFString *line, bool *stop)

A block for enumerating the lines of a string.

Parameters
lineThe current line
stopA pointer to a variable that can be set to true to stop the enumeration

Enumeration Type Documentation

◆ OFStringEncoding

The encoding of a string.

Enumerator
OFStringEncodingUTF8 

UTF-8

OFStringEncodingASCII 

ASCII

OFStringEncodingISO8859_1 

ISO 8859-1

OFStringEncodingISO8859_2 

ISO 8859-2

OFStringEncodingISO8859_3 

ISO 8859-3

OFStringEncodingISO8859_15 

ISO 8859-15

OFStringEncodingWindows1251 

Windows-1251

OFStringEncodingWindows1252 

Windows-1252

OFStringEncodingCodepage437 

Code page 437

OFStringEncodingCodepage850 

Code page 850

OFStringEncodingCodepage858 

Code page 858

OFStringEncodingMacRoman 

Mac OS Roman

OFStringEncodingKOI8R 

KOI8-R

OFStringEncodingKOI8U 

KOI8-U

OFStringEncodingWindows1250 

Windows-1250

OFStringEncodingCodepage852 

Code page 852

OFStringEncodingAutodetect 

Try to automatically detect the encoding

◆ OFStringSearchOptions

Options for searching in strings.

This is a bit mask.

Enumerator
OFStringSearchBackwards 

Search backwards in the string

◆ OFStringSeparationOptions

Options for separating strings.

This is a bit mask.

Enumerator
OFStringSkipEmptyComponents 

Skip empty components

Function Documentation

◆ OFStringEncodingName()

OFString * OFStringEncodingName ( OFStringEncoding encoding)
extern

Returns the name of the specified OFStringEncoding.

Parameters
encodingThe encoding for which to return the name
Returns
The name of the specified OFStringEncoding

◆ OFStringEncodingParseName()

OFStringEncoding OFStringEncodingParseName ( OFString * name)
extern

Parses the specified string encoding name and returns the OFStringEncoding for it.

Throws OFInvalidArgumentException if the specified name is not a valid encoding name.

Parameters
nameThe name to parse as a string encoding
Returns
The OFStringEncoding for the specified name

◆ OFUTF16StringLength()

size_t OFUTF16StringLength ( const OFChar16 * string)
extern

Returns the length of the specified UTF-16 string.

Parameters
stringThe UTF-16 string
Returns
The length of the specified UTF-16 string

◆ OFUTF32StringLength()

size_t OFUTF32StringLength ( const OFChar32 * string)
extern

Returns the length of the specified UTF-32 string.

Parameters
stringThe UTF-32 string
Returns
The length of the specified UTF-32 string