Initial commit
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// LYHelper.m
|
||||
// PhotoShow
|
||||
//
|
||||
// Created by 米明 on 16/3/4.
|
||||
// Copyright © 2016年 LY. All rights reserved.
|
||||
//
|
||||
|
||||
#import "LYHelper.h"
|
||||
|
||||
@implementation LYHelper
|
||||
+(BOOL)isUrl:(NSString *)url{
|
||||
NSString * urlString = @"^(\\w+:\\/\\/)?\\w+(\\.\\w+)+.*$";
|
||||
|
||||
NSPredicate *emailTest = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", urlString];
|
||||
|
||||
return [emailTest evaluateWithObject:url];
|
||||
}
|
||||
@end
|
||||
Reference in New Issue
Block a user