16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
#include "config.h"
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#import "OFString.h"
#import "OFMutableUTF8String.h"
#import "OFInvalidArgumentException.h"
#import "OFInvalidFormatException.h"
#import "OFOutOfRangeException.h"
#import "of_asprintf.h"
#import "unicode.h"
static struct {
Class isa;
} placeholder;
@interface OFMutableStringPlaceholder: OFMutableString
|
>
<
|
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
#include "config.h"
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#import "OFString.h"
#import "OFASPrintF.h"
#import "OFMutableUTF8String.h"
#import "OFInvalidArgumentException.h"
#import "OFInvalidFormatException.h"
#import "OFOutOfRangeException.h"
#import "unicode.h"
static struct {
Class isa;
} placeholder;
@interface OFMutableStringPlaceholder: OFMutableString
|
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
|
{
char *UTF8String;
int UTF8StringLength;
if (format == nil)
@throw [OFInvalidArgumentException exception];
if ((UTF8StringLength = of_vasprintf(&UTF8String, format.UTF8String,
arguments)) == -1)
@throw [OFInvalidFormatException exception];
@try {
[self appendUTF8String: UTF8String length: UTF8StringLength];
} @finally {
free(UTF8String);
|
|
|
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
|
{
char *UTF8String;
int UTF8StringLength;
if (format == nil)
@throw [OFInvalidArgumentException exception];
if ((UTF8StringLength = OFVASPrintF(&UTF8String, format.UTF8String,
arguments)) == -1)
@throw [OFInvalidFormatException exception];
@try {
[self appendUTF8String: UTF8String length: UTF8StringLength];
} @finally {
free(UTF8String);
|