jp3cki/mb_str_replace

The mb_str_replace() implementation.

4.0.2 2016-02-14 17:28 UTC

This package is auto-updated.

Last update: 2024-12-19 06:33:23 UTC


README

The mb_str_replace() implementation.

Build Status

Install

  1. Set up composer. $ curl -sS https://getcomposer.org/installer | php
  2. $ php composer.phar require jp3cki/mb_str_replace
  3. You can find the source in vendor/jp3cki/mb_str_replace/src.

Other ways:

  • Use as submodule (see git manual)
  • Copy the source into your development directory (DO NOT rewrite copyright, see License section)

Use

If using composer

You can use mb_str_replace function after require('vendor/autoload.php').

If not using composer

require or include the source.

require_once('/path/to/mb_str_replace.function.php');

API

function mb_str_replace(
    string|array $search,
    string|array $replace,
    string|array $subject,
    string $encoding = 'auto'
) : string|array

Please refer str_replace.

$encoding = auto means "use internal-encoding."

Note: This module doesn't support $count parameter.

License

The MIT License (MIT)

Copyright (C) 2006,2007,2011,2012,2015 by AIZAWA Hina <hina@bouhime.com>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.