Lines Matching refs:textSpan
407 …$textSpan = self::stripLrmRlm(substr($result, self::LENGTH_START + 3, $spanEnd - self::LENGTH_STAR…
408 if (I18N::scriptDirection(I18N::textScript($textSpan)) === 'rtl') {
524 * @param string $textSpan
529 private static function starredName(string $textSpan, string $direction): string argument
535 $starPos = strpos($textSpan, '*');
539 $trailingText = substr($textSpan, $starPos + 1);
540 $textSpan = substr($textSpan, 0, $starPos);
541 $wordStart = strrpos($textSpan, ' '); // Find the start of the word
543 $leadingText = substr($textSpan, 0, $wordStart + 1);
544 $wordText = substr($textSpan, $wordStart + 1);
547 $wordText = $textSpan;
549 $textSpan = $leadingText . '<u>' . $wordText . '</u>' . $trailingText;
551 … $textSpan = preg_replace('~<span class="starredname">(.*)</span>~', '<u>\1</u>', $textSpan);
553 $textSpan = str_replace([
559 ], $textSpan);
562 $textSpan = preg_replace('~(.*)\*~', '\1', $textSpan);
563 $textSpan = preg_replace('~<span class="starredname">(.*)</span>~', '\1', $textSpan);
566 return $textSpan;
651 $textSpan = substr($result, self::$posSpanStart);
662 while ($textSpan !== '') {
663 $posColon = strpos($textSpan, ':');
667 $posLRE = strpos($textSpan, self::UTF8_LRE);
671 $posPDF = strpos($textSpan, self::UTF8_PDF, $posLRE);
676 …$tempResult .= substr($textSpan, 0, $posLRE + 3); // Copy everything preceding the numeric stri…
677 …$numericString = substr($textSpan, $posLRE + 3, $posPDF - $posLRE); // Separate the entire numeric…
678 $textSpan = substr($textSpan, $posPDF + 3);
707 $textSpan = $numericString . $textSpan;
730 $textSpan = self::UTF8_LRE . $numericString . $textSpan;
732 $textSpan = $tempResult . $textSpan;
742 $savedSpan = $textSpan;
743 while ($textSpan !== '') {
745 if (str_ends_with($textSpan, ' ')) {
747 $textSpan = substr($textSpan, 0, -1);
750 if (str_ends_with($textSpan, ' ')) {
752 $textSpan = substr($textSpan, 0, -1);
755 if (substr($textSpan, -3) !== self::UTF8_PDF) {
757 $textSpan = $savedSpan;
762 $posStartNumber = strrpos($textSpan, self::UTF8_LRE);
766 $trailingString = substr($textSpan, $posStartNumber) . $trailingString;
767 $textSpan = substr($textSpan, 0, $posStartNumber);
770 while ($textSpan !== '') {
771 if (str_ends_with($textSpan, ' ')) {
773 $textSpan = substr($textSpan, 0, -1);
776 if (str_ends_with($textSpan, ' ')) {
778 $textSpan = substr($textSpan, 0, -1);
789 $savedSpan = $textSpan;
791 while ($textSpan !== '') {
792 if (str_ends_with($textSpan, ' ')) {
794 $textSpan = substr($textSpan, 0, -1);
797 if (str_ends_with('......' . $textSpan, ' ')) {
799 $textSpan = substr($textSpan, 0, -6);
804 while (str_ends_with($textSpan, '<LTRbr>')) {
806 $textSpan = substr($textSpan, 0, -7);
809 while ($textSpan !== '') {
810 if (str_ends_with($textSpan, ' ')) {
812 $textSpan = substr($textSpan, 0, -1);
815 if (str_ends_with($textSpan, ' ')) {
817 $textSpan = substr($textSpan, 0, -6);
824 $textSpan = $savedSpan;
836 while ($textSpan !== '') {
837 if (str_ends_with($textSpan, ' ')) {
839 $textSpan = substr($textSpan, 0, -1);
842 if (str_ends_with($textSpan, ' ')) {
844 $textSpan = substr($textSpan, 0, -1);
851 if ($textSpan === '') {
854 $trailingChar = substr($textSpan, -1);
858 $textSpan = substr($textSpan, 0, -1);
864 if (!str_ends_with($textSpan, ')')) {
867 $posLeftParen = strrpos($textSpan, '(');
871 … $temp = self::stripLrmRlm(substr($textSpan, $posLeftParen)); // Get rid of UTF8 control codes
890 $trailingID = substr($textSpan, $posLeftParen);
891 $textSpan = substr($textSpan, 0, $posLeftParen);
897 while ($textSpan !== '') {
898 if (str_ends_with($textSpan, ' ')) {
900 $textSpan = substr($textSpan, 0, -1);
903 if (str_ends_with($textSpan, ' ')) {
905 $textSpan = substr($textSpan, 0, -6);
908 if (str_ends_with($textSpan, '-')) {
910 $textSpan = substr($textSpan, 0, -1);
919 $savedSpan = $textSpan;
920 while ($textSpan !== '') {
921 if (str_starts_with($textSpan, ' ')) {
923 $textSpan = substr($textSpan, 1);
926 if (str_starts_with($textSpan, ' ')) {
928 $textSpan = substr($textSpan, 6);
931 if (str_starts_with($textSpan, '-')) {
933 $textSpan = substr($textSpan, 1);
940 $textSpan = $savedSpan;
947 … $textSpan = self::starredName($textSpan, 'LTR'); // Wrap starred name in <u> and </u> tags
950 if (str_contains($textSpan, ' <LTRbr>')) {
951 $textSpan = str_replace(' <LTRbr>', '<LTRbr>', $textSpan);
954 if (str_contains($textSpan, ' <LTRbr>')) {
955 $textSpan = str_replace(' <LTRbr>', '<LTRbr>', $textSpan);
963 $result .= $textSpan . self::END_LTR;
981 $savedSpan = $textSpan;
984 while ($textSpan !== '') {
985 if (str_ends_with($textSpan, ' ')) {
987 $textSpan = substr($textSpan, 0, -1);
990 if (str_ends_with('......' . $textSpan, ' ')) {
992 $textSpan = substr($textSpan, 0, -6);
997 while (str_ends_with($textSpan, '<RTLbr>')) {
999 $textSpan = substr($textSpan, 0, -7);
1004 $textSpan = $savedSpan;
1010 $savedSpan = $textSpan;
1011 while ($textSpan !== '') {
1013 if (str_ends_with($textSpan, ' ')) {
1015 $textSpan = substr($textSpan, 0, -1);
1018 if (str_ends_with($textSpan, ' ')) {
1020 $textSpan = substr($textSpan, 0, -1);
1023 if (substr($textSpan, -3) !== self::UTF8_PDF) {
1025 $textSpan = $savedSpan;
1030 $posStartNumber = strrpos($textSpan, self::UTF8_LRE);
1034 $trailingString = substr($textSpan, $posStartNumber) . $trailingString;
1035 $textSpan = substr($textSpan, 0, $posStartNumber);
1038 while ($textSpan !== '') {
1039 if (str_ends_with($textSpan, ' ')) {
1041 $textSpan = substr($textSpan, 0, -1);
1044 if (str_ends_with($textSpan, ' ')) {
1046 $textSpan = substr($textSpan, 0, -1);
1058 if (!$theEnd && str_ends_with('...' . $textSpan, ' - ')) {
1059 $textSpan = substr($textSpan, 0, -3);
1065 $posDashString = strpos($textSpan, ' - <RTLbr>');
1069 $posStringStart = strrpos(substr($textSpan, 0, $posDashString), '<RTLbr>');
1076 …$textSpan = substr($textSpan, 0, $posStringStart) . ' - ' . substr($textSpan, $posStringStart, $po…
1081 while ($textSpan !== '') {
1082 if (str_starts_with($textSpan, ' ')) {
1084 $textSpan = substr($textSpan, 1);
1087 if (str_starts_with($textSpan, ' ')) {
1089 $textSpan = substr($textSpan, 6);
1097 while ($textSpan !== '') {
1098 if (str_ends_with($textSpan, ' ')) {
1100 $textSpan = substr($textSpan, 0, -1);
1103 if (str_ends_with($textSpan, ' ')) {
1105 $textSpan = substr($textSpan, 0, -6);
1112 if (str_ends_with($textSpan, ' -')) {
1113 $posDashString = strlen($textSpan) - 2;
1114 $posStringStart = strrpos(substr($textSpan, 0, $posDashString), '<RTLbr>');
1121 …$textSpan = substr($textSpan, 0, $posStringStart) . '- ' . substr($textSpan, $posStringStart, $pos…
1125 $newLength = strlen($textSpan) + $countLeadingSpaces;
1126 …$textSpan = str_pad($textSpan, $newLength, ' ', I18N::direction() === 'rtl' ? STR_PAD_LEFT : STR_…
1136 $newLength = strlen($textSpan) + $countTrailingSpaces;
1137 $textSpan = str_pad($textSpan, $newLength);
1142 … $textSpan = self::starredName($textSpan, 'RTL'); // Wrap starred name in <u> and </u> tags
1143 $result .= $textSpan . self::END_RTL;
1147 $result .= $textSpan;