832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
|
encoding: OF_STRING_ENCODING_UTF_8
length: UTF8StringLength];
}
- (instancetype)initWithUTF8StringNoCopy: (char *)UTF8String
freeWhenDone: (bool)freeWhenDone
{
@try {
return [self initWithUTF8String: UTF8String];
} @finally {
if (freeWhenDone)
free(UTF8String);
}
}
- (instancetype)initWithUTF8StringNoCopy: (char *)UTF8String
length: (size_t)UTF8StringLength
freeWhenDone: (bool)freeWhenDone
{
@try {
return [self initWithUTF8String: UTF8String
length: UTF8StringLength];
} @finally {
if (freeWhenDone)
free(UTF8String);
}
}
- (instancetype)initWithCString: (const char *)cString
encoding: (of_string_encoding_t)encoding
{
return [self initWithCString: cString
encoding: encoding
|
>
>
|
>
>
>
>
|
|
>
>
|
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
|
encoding: OF_STRING_ENCODING_UTF_8
length: UTF8StringLength];
}
- (instancetype)initWithUTF8StringNoCopy: (char *)UTF8String
freeWhenDone: (bool)freeWhenDone
{
id ret;
@try {
ret = [self initWithUTF8String: UTF8String];
} @finally {
if (freeWhenDone)
free(UTF8String);
}
return ret;
}
- (instancetype)initWithUTF8StringNoCopy: (char *)UTF8String
length: (size_t)UTF8StringLength
freeWhenDone: (bool)freeWhenDone
{
id ret;
@try {
ret = [self initWithUTF8String: UTF8String
length: UTF8StringLength];
} @finally {
if (freeWhenDone)
free(UTF8String);
}
return ret;
}
- (instancetype)initWithCString: (const char *)cString
encoding: (of_string_encoding_t)encoding
{
return [self initWithCString: cString
encoding: encoding
|