mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-21 14:25:14 +00:00
18 lines
407 B
Objective-C
18 lines
407 B
Objective-C
#import "TextAnchor.h"
|
|
|
|
NSString* TextAnchorToString( enum TextAnchor fw )
|
|
{
|
|
return TextAnchorStrings[fw];
|
|
}
|
|
|
|
enum TextAnchor TextAnchorFromString( NSString* s )
|
|
{
|
|
const NSUInteger l = sizeof(TextAnchorStrings) / sizeof(NSString*);
|
|
for (NSUInteger i = 0; i < l; i++) {
|
|
if ([s isEqualToString:TextAnchorStrings[i]]) {
|
|
return i;
|
|
}
|
|
}
|
|
return TextAnchorDEFAULT;
|
|
}
|