首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

Transliterator (class)

Introduction

(PHP >= 5.4.0, PECL intl >= 2.0.0)

Transliterator provides transliteration of strings.

Class synopsis

Transliterator {

/* Constants */

const integer FORWARD = 0 ;

const integer REVERSE = 1 ;

/* Properties */

public $id ;

/* Methods */

__construct ( void )

代码语言:javascript
复制
public static Transliterator create ( string $id [, int $direction ] )
代码语言:javascript
复制
public static Transliterator createFromRules ( string $rules [, string $direction ] )
代码语言:javascript
复制
public Transliterator createInverse ( void )
代码语言:javascript
复制
public int getErrorCode ( void )
代码语言:javascript
复制
public string getErrorMessage ( void )
代码语言:javascript
复制
public static array listIDs ( void )
代码语言:javascript
复制
public string transliterate ( string $subject [, int $start [, int $end ]] )

}

Properties

id

Predefined Constants

Transliterator::FORWARDTransliterator::REVERSE

Table of Contents

  • Transliterator::__construct — Private constructor to deny instantiation
  • Transliterator::create — Create a transliterator
  • Transliterator::createFromRules — Create transliterator from rules
  • Transliterator::createInverse — Create an inverse transliterator
  • Transliterator::getErrorCode — Get last error code
  • Transliterator::getErrorMessage — Get last error message
  • Transliterator::listIDs — Get transliterator IDs
  • Transliterator::transliterate — Transliterate a string

← Spoofchecker::setChecks

Transliterator::__construct →

代码语言:txt
复制
 ? 1997–2017 The PHP Documentation Group

Licensed under the Creative Commons Attribution License v3.0 or later.

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com