mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
compatibility tweak
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30644 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
c5bd50b2db
commit
10f1e77d82
2 changed files with 11 additions and 1 deletions
|
@ -767,12 +767,16 @@ handle_printf_atsign (FILE *stream,
|
|||
}
|
||||
|
||||
/**
|
||||
* Create a string based on the given UTF-8 string, null-terminated.
|
||||
* Create a string based on the given UTF-8 string, null-terminated.<br />
|
||||
* Raises NSInvalidArgumentException if given NULL pointer.
|
||||
*/
|
||||
+ (id) stringWithUTF8String: (const char *)bytes
|
||||
{
|
||||
NSString *obj;
|
||||
|
||||
if (NULL == bytes)
|
||||
[NSException raise: NSInvalidArgumentException
|
||||
format: @"[NSString+stringWithUTF8String:]: NULL cString"];
|
||||
obj = [self allocWithZone: NSDefaultMallocZone()];
|
||||
obj = [obj initWithUTF8String: bytes];
|
||||
return AUTORELEASE(obj);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue