Skip to content

Objective-C Parameter Substitution: Replacing parameter names in NSString with parameters from NSDictionary

Notifications You must be signed in to change notification settings

oskob/Objetive-C-Parameter-Substitution

Repository files navigation

Objetive-C Parameter Substitution Category

Simple category for substituting parameter names with values.

Usage

#import "NSString+ParameterSubstitution.h"

NSString *rawString = @"Hello %name%!";
NSString *parameters = @{@"name": @"World"};
NSString *substitutedString = [rawString stringBySubstitutingParameters:parameters];

// substitutedString == @"Hello World!"

About

Objective-C Parameter Substitution: Replacing parameter names in NSString with parameters from NSDictionary

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published