This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <unicode/utf8.h> | |
// This only covers two of the common Emoji ranges, but the Emoji character set is broken | |
// up across seven different regions. | |
@implementation NSString (StripEmoji) | |
- (NSString *)stringByRemovingEmoji { | |
NSData *d = [self dataUsingEncoding:NSUTF8StringEncoding allowLossyConversion:NO]; | |
if(!d) return nil; | |
const char *buf = d.bytes; | |
unsigned int len = [d length]; | |
char *s = (char *)malloc(len); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function _uh { [[ -z $DEV ]]; return $? } | |
function userroot { | |
if ! _uh; then echo $DEV; | |
else echo $HOME; fi | |
} | |
function _sdirname { | |
echo "$(userroot)/.sdirs" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
SDK=`dirname $0` | |
SCRIPT=`basename $0` | |
SDKPARENT=`dirname $SDK` | |
PLATFORM=`uname -sp` | |
if [ "$PLATFORM" = "Darwin i386" -o "$PLATFORM" = "Darwin x86_64" ]; then | |
echo "iPhone Toolchain installer script by rpetrich" | |
echo "" |