Skip to content

ddvphp/ddv-util

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ddv-util

Installation - 安装

composer require ddvphp/ddv-util

Usage - 使用

1、驼峰转小写下滑杠 humpToUnderline

$a = \DdvPhp\DdvUtil\String\Conversion::humpToUnderline('userLoginTest');
var_dump($a);

1.1、驼峰转小写下滑杠 humpToUnderlineByArray

$a = \DdvPhp\DdvUtil\String\Conversion::humpToUnderlineByArray([
	'userLoginTest'=>'11',
	'userLoginTest1'=>'12'
]);
var_dump($a);

2、小写下滑杠转驼峰 underlineToHump

$a = \DdvPhp\DdvUtil\String\Conversion::underlineToHump('user_login_test');
var_dump($a);

3、小写中杠转驼峰 middleLineToHump

$a = \DdvPhp\DdvUtil\String\Conversion::middleLineToHump('user-login-test');
var_dump($a);

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages