本文整理汇总了PHP中TCPDF_STATIC::revstrpos方法的典型用法代码示例。如果您正苦于以下问题:PHP TCPDF_STATIC::revstrpos方法的具体用法?PHP TCPDF_STATIC::revstrpos怎么用?PHP TCPDF_STATIC::revstrpos使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TCPDF_STATIC
的用法示例。
在下文中一共展示了TCPDF_STATIC::revstrpos方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: writeHTML
//.........这里部分代码省略.........
$midpos = $opentagpos;
} elseif (isset($this->footerlen[$startlinepage]) and !$this->InFooter) {
$this->footerpos[$startlinepage] = $this->pagelen[$startlinepage] - $this->footerlen[$startlinepage];
$midpos = $this->footerpos[$startlinepage];
} else {
$midpos = 0;
}
if ($midpos > 0) {
$pmid = substr($this->getPageBuffer($startlinepage), $startlinepos, $midpos - $startlinepos);
$pend = substr($this->getPageBuffer($startlinepage), $midpos);
} else {
$pmid = substr($this->getPageBuffer($startlinepage), $startlinepos);
$pend = '';
}
}
if (isset($plalign) and ($plalign == 'C' or $plalign == 'J' or $plalign == 'R' and !$this->rtl or $plalign == 'L' and $this->rtl)) {
// calculate shifting amount
$tw = $w;
if ($plalign == 'J' and $this->isRTLTextDir() and $this->num_columns > 1) {
$tw += $this->cell_padding['R'];
}
if ($this->lMargin != $prevlMargin) {
$tw += $prevlMargin - $this->lMargin;
}
if ($this->rMargin != $prevrMargin) {
$tw += $prevrMargin - $this->rMargin;
}
$one_space_width = $this->GetStringWidth(chr(32));
$no = 0;
// number of spaces on a line contained on a single block
if ($this->isRTLTextDir()) {
// RTL
// remove left space if exist
$pos1 = TCPDF_STATIC::revstrpos($pmid, '[(');
if ($pos1 > 0) {
$pos1 = intval($pos1);
if ($this->isUnicodeFont()) {
$pos2 = intval(TCPDF_STATIC::revstrpos($pmid, '[(' . chr(0) . chr(32)));
$spacelen = 2;
} else {
$pos2 = intval(TCPDF_STATIC::revstrpos($pmid, '[(' . chr(32)));
$spacelen = 1;
}
if ($pos1 == $pos2) {
$pmid = substr($pmid, 0, $pos1 + 2) . substr($pmid, $pos1 + 2 + $spacelen);
if (substr($pmid, $pos1, 4) == '[()]') {
$linew -= $one_space_width;
} elseif ($pos1 == strpos($pmid, '[(')) {
$no = 1;
}
}
}
} else {
// LTR
// remove right space if exist
$pos1 = TCPDF_STATIC::revstrpos($pmid, ')]');
if ($pos1 > 0) {
$pos1 = intval($pos1);
if ($this->isUnicodeFont()) {
$pos2 = intval(TCPDF_STATIC::revstrpos($pmid, chr(0) . chr(32) . ')]')) + 2;
$spacelen = 2;
} else {
$pos2 = intval(TCPDF_STATIC::revstrpos($pmid, chr(32) . ')]')) + 1;
$spacelen = 1;
}
if ($pos1 == $pos2) {