<commit_before># LYCategory

The categories.

## Installation

#### Cocoapods
Just put this↓ in your Podfile, then run 'pod install'.

~~~markdown
# LYCategory
pod 'LYCategory', :git=>'https://github.com/blodely/LYCategory.git'
~~~

#### Git submodule

Use command `git submodule`.

#### Files

Or you can just download and unzip the file, put them in your project.

## features

#### Foundation

#### NSString

~~~objective-c

// You can check string input

[@"" isEmpty];
// YES

[@"<EMAIL>" isEmail];
// YES

[@"<PASSWORD>" isPhoneNumber];
// YES

[@"139-8621-0000" phoneNumber];
// @"13986213146"

// Or you can trim space charactor:
[@"lalala this is a string" trimSpace];

// Or just..
[@"   lalala try this." trimStartSpace];

// Search string
-caseInsensitive:
-caseSensitive:

// compare
-isEqualWithFormat:

// Find out if it's in a array of strings.
[@"carrot" isOneOfThem:@[@"flower", @"carrot", @"potato",]];
// YES

// Calculate displaying size
[@"bla bla bla" widthWithFont:[UIFont systemFontOfSize:12]];

// Encryption
-base64
-md5
-md5Lowercase16
// ..etc

// Convert to NSDate object
[@"2016-06-29" dateWithFormat:@"yyyy-MM-dd"];
// return NSDate object

-dateWithFormat:andTimezone:
-dateWithFormat:dateStyle:

~~~

#### NSArray

~~~objectice-c

// Reverse array
NSArray *things = @[@"log", @"grass", @"coal",];
[things reversed];

~~~


#### NSURL

~~~objective-c
// Creation
NSInteger tid = 10504;
[NSURL URLWithFormat:@"http://luoyu.space/tid=%@", @(tid)];

~~~

#### NSUserDefaults

##### Speed
~~~objective-c
[NSUserDefaults setObject:@"thatMustBeTrue" forKey:@"space.luoyu.testApp.config.isThatTrue"];
~~~

-
#### UIKit

#### UITextField

Check if textField is empty string or not, use method `-isEmpty`.

#### UITextView

To check custom string as textview's placeholder, method `-isEmptyWithPlaceholder:`.

#### UIView

To take view snapshot, use `-imageShot` method.

#### UIImage

To shrink image size down, use `-resize:` method.


and etc.<commit_msg>Modify : readme file<commit_after># LYCategory

The categories.

## Installation

#### Cocoapods
Just put this↓ in your Podfile, then run 'pod install'.

~~~markdown
# LYCategory
pod 'LYCategory', :git=>'https://github.com/blodely/LYCategory.git'
~~~

#### Git submodule

Use command `git submodule`.

#### Files

Or you can just download and unzip the file, put them in your project.

## features

#### Foundation

#### NSString

~~~objective-c

// You can check string input

[@"" isEmpty];
// YES

[@"<EMAIL>" isEmail];
// YES

[@"13986210000" isPhoneNumber];
// YES

[@"139-8621-0000" phoneNumber];
// @"13986213146"

// Or you can trim space charactor:
[@"lalala this is a string" trimSpace];

// Or just..
[@"   lalala try this." trimStartSpace];

// Search string
-caseInsensitive:
-caseSensitive:

// compare
-isEqualWithFormat:

// Find out if it's in a array of strings.
[@"carrot" isOneOfThem:@[@"flower", @"carrot", @"potato",]];
// YES

// Calculate displaying size
[@"bla bla bla" widthWithFont:[UIFont systemFontOfSize:12]];

// Encryption
-base64
-md5
-md5Lowercase16
// ..etc

// Convert to NSDate object
[@"2016-06-29" dateWithFormat:@"yyyy-MM-dd"];
// return NSDate object

-dateWithFormat:andTimezone:
-dateWithFormat:dateStyle:

~~~

#### NSArray

~~~objectice-c

// Reverse array
NSArray *things = @[@"log", @"grass", @"coal",];
[things reversed];

~~~


#### NSURL

~~~objective-c
// Creation
NSInteger tid = 10504;
[NSURL URLWithFormat:@"http://luoyu.space/tid=%@", @(tid)];

~~~

#### NSUserDefaults

##### Speed
~~~objective-c
[NSUserDefaults setObject:@"thatMustBeTrue" forKey:@"space.luoyu.testApp.config.isThatTrue"];
~~~

-
#### UIKit

#### UITextField

Check if textField is empty string or not, use method `-isEmpty`.

#### UITextView

To check custom string as textview's placeholder, method `-isEmptyWithPlaceholder:`.

#### UIView

To take view snapshot, use `-imageShot` method.

#### UIImage

To shrink image size down, use `-resize:` method.

-
and etc.
{'fraction_non_alphanumeric': 0.18021646111250944, 'fraction_numerical': 0.024414799899320414, 'mean_word_length': 4.277556440903054, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 8, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5719402', 'n_tokens_mistral': 1534, 'n_tokens_neox': 1369, 'n_words': 385}