Download the PHP package andydune/string-replace without Composer

On this page you can find all versions of the php package andydune/string-replace. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package string-replace

StringReplace

Build Status Packagist Version Total Downloads

It replace in given string meta data with real data.

Requirements

PHP version >= 7.2

Installation

Installation using composer:

Or if composer was not installed globally:

Or edit your composer.json:

And execute command:

SimpleReplace

It's very simple and lightweight replace methods. It uses str_replace function.

There is no any logic in it and it will no replace statements if no data to replace.

PowerReplace

It powerful replace class with string analytics with regular. There are many functions built-in lib and you may add custom easily.

No case sensitive

Functions

Functions are described next to marker after : (you can change separator).

Functions can get parameters: #CODE:maxlen(10)# or #CODE:maxlen("10")#

Symbols: : ( ) , " ' are reserved to use as parameters for function. So if you want to use it you mast encase it with quotes (or single quotes).

This is correct usage:

More then one function : #CODE:maxlen(10):escape#

escape

Apply htmlspecialchars with inserted value.

addcomma

It adds comma before inserted value if it is not empty.

comma function may get params: comma(param1, param2)

maxlen

Replace marker with value if string behind this one is less then poined in parameter.

printf

Print formatted string if it is not empty.

plural

Pluralize the title for number.

pluralrus

Russian pluralize the title for number.

prefix

It shows given string as prefix only if value behind the key is not empty.

postfix

It shows given string as postfix only if value behind the key is not empty.

showIfEqual

It shows string given in second param if first param is equal to value behind the placeholder.

showIfOtherValueNotEmpty

It shows string value behind the current placeholder if another is not empty.

Custom Functions

You can add your own functions with replace rules. Markers and functions are not case sensitive.

Application


All versions of string-replace with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
ext-mbstring Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package andydune/string-replace contains the following files

Loading the files please wait ....