Half
extends AbstractWidth
in package
Table of Contents
Constants
Properties
- $str : string
Methods
- exist() : bool
- notExist() : bool
- notOnly() : bool
- only() : bool
- set() : Half
- calcStrAllFullWidth() : int
- すべて全角文字だった場合の横幅の長さを計算します
- calcStrAllHalfWidth() : int
- すべて半角文字だった場合の横幅の長さを計算します
- getStrLength() : int
- 文字列の長さを取得します
- getStrWidth() : int
- 文字列の横幅を取得します
- __construct() : mixed
Constants
FULL_CHARACTER_WIDTH
public
int
FULL_CHARACTER_WIDTH
= 2
全角1文字の幅
HALF_CHARACTER_WIDTH
public
int
HALF_CHARACTER_WIDTH
= 1
半角1文字の幅
Properties
$str
protected
string
$str
Methods
exist()
public
exist() : bool
Return values
boolnotExist()
public
notExist() : bool
Return values
boolnotOnly()
public
notOnly() : bool
Return values
boolonly()
public
only() : bool
Return values
boolset()
public
static set(string $val) : Half
Parameters
- $val : string
Return values
HalfcalcStrAllFullWidth()
すべて全角文字だった場合の横幅の長さを計算します
protected
calcStrAllFullWidth() : int
Return values
int —横幅の長さを返します
calcStrAllHalfWidth()
すべて半角文字だった場合の横幅の長さを計算します
protected
calcStrAllHalfWidth() : int
Return values
int —横幅の長さを返します
getStrLength()
文字列の長さを取得します
protected
getStrLength() : int
Return values
int —文字列の長さを返します
getStrWidth()
文字列の横幅を取得します
protected
getStrWidth() : int
Return values
int —文字列の横幅を返します
__construct()
private
__construct(string $val) : mixed
Parameters
- $val : string