PJR-NSString-Category
- 授权协议: BSD
- 开发语言: Objective-C
- 操作系统: iOS
- 软件首页: https://github.com/paritsohraval100/PJR-NSString-Category
软件介绍
PJR-NSString-Category 是 NSString 的分类,可以执行很多字符串操作,包括:
String validation.
Email validation.
Phone validation.
URL validation.
Add or remove substring.
Get Substring.
Get Application version.
Get Application Name.
Generate Array from string.
Get String from Array.
Get Number of words in String.
Check if my string contains only letters, only numbers or both.
Convert NSData from NSString.
示例代码:
//Examples of NSString Category
NSString *testStr = @"Hello";
if([testStr isValid]){
NSLog(@"It is a Valid String");
}
NSString *blankStr = @" ";
if([blankStr isBlank]){
NSLog(@"It is a blank String");
}
NSString *noOfWordsStr = @"Number of Words";
NSLog(@"Number of words are :%d",[noOfWordsStr countNumberOfWords]);
if([noOfWordsStr containsString:@"of"]){
NSLog(@"YES");
}
if([noOfWordsStr isBeginsWith:@"N"]){
NSLog(@"YES");
}
if([noOfWordsStr isEndssWith:@"s"]){
NSLog(@"YES");
}
NSLog(@"string after replace charcter is :%@",[noOfWordsStr replaceCharcter:@"of" withCharcter:@"offfff"]);
NSLog(@"Get substring :%@",[noOfWordsStr getSubstringFrom:1 to:6]);
NSLog(@"Add string :%@",[noOfWordsStr addString:@" are 3"]);
NSLog(@"Removed string :%@",[noOfWordsStr removeSubString:@"of"]);
NSString *letterStr = @"abcd";
NSString *numberStr = @"1234";
NSString *letterNuberStr = @"sdf545";
if([letterStr containsOnlyLetters]){
NSLog(@"Contanis only letters");
}
if([numberStr containsOnlyNumbers]){
NSLog(@"Contanis only numbers");
}
if([letterNuberStr containsOnlyNumbersAndLetters]){
NSLog(@"Contanis letters and numbers");
}
NSArray *array = [NSArray arrayWithObjects:letterStr,numberStr,letterNuberStr, nil];
if([numberStr isInThisarray:array]){
NSLog(@"Yes number string is in this array");
}
NSLog(@"String from array is :%@",[NSString getStringFromArray:array]);
NSLog(@"Array from String is :%@",[noOfWordsStr getArray]);
NSLog(@"My Application Version number is :%@",[NSString getMyApplicationVersion]);
NSLog(@"My Application name is :%@",[NSString getMyApplicationName]);
if([@"pjr@gmail.com" isValidEmail]){
NSLog(@"It is valid Email");
}
if(![@"21323gf" isVAlidPhoneNumber]){
NSLog(@"It is not valid Phone number");
}
if([@"http://www.google.com" isValidUrl]){
NSLog(@"It is valid URL");
}
Java核心技术及面试指南
金华、胡书敏、周国华、吴倍敏 / 北京大学出版社 / 2018-9-1 / 59.00
本书根据大多数软件公司对高级开发的普遍标准,为在Java 方面零基础和开发经验在3 年以下的初级程序员提供了升级到高级工程师的路径,并以项目开发和面试为导向,精准地讲述升级必备的技能要点。具体来讲,本书围绕项目常用技术点,重新梳理了基本语法点、面向对象思想、集合对象、异常处理、数据库操作、JDBC、IO 操作、反射和多线程等知识点。 此外,本书还提到了对项目开发很有帮助的“设计模式”和“虚拟......一起来看看 《Java核心技术及面试指南》 这本书的介绍吧!
