承接 mulertech/char-manipulation 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

mulertech/char-manipulation

最新稳定版本:v1.0.4

Composer 安装命令:

composer require mulertech/char-manipulation

包简介

This class manipulates characters

README 文档

README

Latest Version on Packagist GitHub Tests Action Status GitHub PHPStan Action Status GitHub Security Action Status Total Downloads Test Coverage

This class manipulates characters

Installation

Two methods to install Application package with composer :

Add to your "composer.json" file into require section :

"mulertech/char-manipulation": "^1.0"

and run the command :

php composer.phar update

Run the command :

php composer.phar require mulertech/char-manipulation "^1.0"

Usage


specialCharsTrim, trim and convert special characters to HTML entities :
CharManipulation::specialCharsTrim(' Test trim ');

// 'Test trim'
CharManipulation::specialCharsTrim('<script\>Test without html balise</script>');

// 'Test without html balise'
CharManipulation::specialCharsTrim([' Test "trim"', '<script\>with</script>', ' array  ', ' and', 'null ', null]);

// ['Test &quot;trim&quot;', 'with', 'array', 'and', 'null', null]

specialCharsDecode (decode chars into string or array by reference, no return) :
$test = '&#039;test single quote';
CharManipulation::specialCharsDecode($test);

// echo $test;
// "'test single quote";
$test = [
            'test1' => '&#039;test single quote',
            'test2' => 'test quote&quot;',
            'test3' => 'with null',
            'test4' => null,
            'test5' => [
                'test5a' => "&#039;test single quote",
                'test5b' => 'test quote&quot;',
                'test5c' => 'with null',
                'test5d' => null
            ]
        ];
CharManipulation::specialCharsDecode($test);

// echo $test;
// [
        'test1' => "'test single quote",
        'test2' => 'test quote"',
        'test3' => 'with null',
        'test4' => null,
        'test5' => [
            'test5a' => "'test single quote",
            'test5b' => 'test quote"',
            'test5c' => 'with null',
            'test5d' => null
        ]
   ];

统计信息

  • 总下载量: 461
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 4
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-10-31

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固