scriptingEndsWith:
オブジェクトはレシーバの終わりと合うかを返します
-(BOOL)scriptingEndsWith:(id)object:
解説
オブジェクトはレシーバの終わりと合うかを返します。
返り値
( BOOL )
YES/NO
引数
( id )object
フレームワーク
Foundation
クラス
NSScriptingComparisonMethods
Instance Methods
使用可能
10.0
参照
例文
#import "MyObject.h" @implementation MyObject - (IBAction)myAction:(id)sender { NSAttributedString *aString = [[NSAttributedString alloc] initWithString:@"abc"]; NSAttributedString *bString = [[NSAttributedString alloc] initWithString:@"bc"]; ([aString scriptingEndsWith:bString]) ? NSLog(@"YES") : NSLog(@"NO"); } @end