Skip to content

SnugJoker/PBJString

Repository files navigation

PBJString

CI Status Version License Platform Languages BCH compliance CocoaPods Donate

Description

NSString class category for more powerful string handling.

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

No requirements needed.

Installation

PBJString is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'PBJString'

How To Use

To use PBJAnimations first import the class:

#import "NSString+PBJString.h"

Then simply add one of the methods to your code:

Objective C

+(BOOL)isStringNullOrEmpty:(NSString *)string;
+(BOOL)isString:(NSString *)primary ContainsAnotherString:(NSString *)secondary;

+(NSString *)returnEmptyStringIfNil:(NSString *)string;
+(NSString *)returnStringOfBooleanWord:(BOOL)trueOrFalse;

+(NSString *)trimLeadingAndTrailingWhiteSpacesFromString:(NSString *)string;
+(NSString *)trimNumbersOutOfString:(NSString *)string;

+(NSString *)truncateString:(NSString *)string toLength:(int)length;

+(NSString *)stringWithUTF8Format:(NSString *)string;

+(BOOL)isStringContainsOnlyNumbers:(NSString *)string;
+(BOOL)isStringContainsAnyNumbers:(NSString *)string;

+(NSNumber *)convertStringToNumber:(NSString *)string;

+(NSString *)addHTMLRightAlignmentToString:(NSString *)string;
+(NSString *)addHTMLLeftAlignmentToString:(NSString *)string;
+(NSString *)addHTMLCenterAlignmentToString:(NSString *)string;

Author

Joseph Razon, razonjoe@gmail.com

License

PBJString is available under the MIT license. See the LICENSE file for more info.

About

PBJString is a simple NSString category for more powerful string handling.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published