You are here

private static function CalendarSystemsPoorMansJaliliCalendar::substr in Calendar Systems 8.3

2 calls to CalendarSystemsPoorMansJaliliCalendar::substr()
CalendarSystemsPoorMansJaliliCalendar::getDayNames in src/CalendarSystems/CalendarSystemsPoorMansJaliliCalendar.php
CalendarSystemsPoorMansJaliliCalendar::getMonthNames in src/CalendarSystems/CalendarSystemsPoorMansJaliliCalendar.php

File

src/CalendarSystems/CalendarSystemsPoorMansJaliliCalendar.php, line 544
Fallback calendar implementation in case php-intl is not avaiable.

Class

CalendarSystemsPoorMansJaliliCalendar
Jalali calendar for calendar_systems.

Namespace

Drupal\calendar_systems\CalendarSystems

Code

private static function substr($str, $start, $len) {
  if (function_exists('mb_substr')) {
    return mb_substr($str, $start, $len, 'UTF-8');
  }
  else {
    return substr($str, $start, $len * 2);
  }
}