• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP lowercase函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中lowercase函数的典型用法代码示例。如果您正苦于以下问题:PHP lowercase函数的具体用法?PHP lowercase怎么用?PHP lowercase使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了lowercase函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: weekDayIndex

 protected function weekDayIndex($day)
 {
     $day = lowercase($day);
     if (!in_array($day, $this->validDays)) {
         throw new \InvalidArgumentException("Provided day '{$day}' is not valid");
     }
     return $this->validDays[$day];
 }
开发者ID:robzienert,项目名称:TemporalExpression,代码行数:8,代码来源:DayOfTheWeek.php


示例2: renderBlock

 public function renderBlock($blockId)
 {
     $block = $this->blockProvider->getOneById($blockId);
     if ($block && isset($block['type'])) {
         $template = '@block_' . lowercase($block['type']) . '/view.twig';
         // TODO: need to get other block params
         return $this->twigEnvironment->render($template, array('block_id' => $blockId));
     }
 }
开发者ID:nodepub,项目名称:core,代码行数:9,代码来源:TwigExtension.php


示例3: prepare_parentTitle

function prepare_parentTitle($page, $key)
{
    if ($page['parent'] != '') {
        $parentTitle = returnPageField($page['parent'], "title");
        return lowercase($parentTitle . ' ' . $key);
    } else {
        return lowercase($key);
    }
}
开发者ID:HelgeSverre,项目名称:GetSimpleCMS,代码行数:9,代码来源:pages.php


示例4: getKeywordsTitle

function getKeywordsTitle($document)
{
    global $titlePattern;
    global $titleSplitPattern;
    global $dictionaryExclude;
    $titleMatch = array();
    if (preg_match($titlePattern, $document, $titleMatch) != 1) {
        return null;
    }
    $keywords = preg_split($titleSplitPattern, $titleMatch[1], NULL, PREG_SPLIT_NO_EMPTY);
    $keywords = lowercase($keywords);
    $count = count($keywords);
    for ($i = 0; $i < $count; $i++) {
        if (in_array($keywords[$i], $dictionaryExclude)) {
            unset($keywords[$i]);
        }
    }
    return $keywords;
}
开发者ID:radutopor,项目名称:experimental-search-engine,代码行数:19,代码来源:extract_keywords.php


示例5: directoryToMultiArray

/**
 * Return a directory of files and folders with heirarchy and additional data
 *
 * @since 3.1.3
 *
 * @param $directory string directory to scan
 * @param $recursive boolean whether to do a recursive scan or not. 
 * @param $exts array file extension include filter, array of extensions to include
 * @param $exclude bool true to treat exts as exclusion filter instead of include
 * @return multidimensional array or files and folders {type,path,name}
 */
function directoryToMultiArray($dir, $recursive = true, $exts = null, $exclude = false)
{
    // $recurse is not implemented
    $result = array();
    $dir = rtrim($dir, DIRECTORY_SEPARATOR);
    $cdir = scandir($dir);
    foreach ($cdir as $key => $value) {
        if (!in_array($value, array(".", ".."))) {
            if (is_dir($dir . DIRECTORY_SEPARATOR . $value)) {
                $path = preg_replace("#\\\\|//#", "/", $dir . '/' . $value . '/');
                $result[$value] = array();
                $result[$value]['type'] = "directory";
                $result[$value]['path'] = $path;
                $result[$value]['dir'] = $value;
                $result[$value]['value'] = call_user_func(__FUNCTION__, $path, $recursive, $exts, $exclude);
            } else {
                $path = preg_replace("#\\\\|//#", "/", $dir . '/');
                // filetype filter
                $ext = lowercase(pathinfo($value, PATHINFO_EXTENSION));
                if (is_array($exts)) {
                    if (!in_array($ext, $exts) and !$exclude) {
                        continue;
                    }
                    if ($exclude and in_array($ext, $exts)) {
                        continue;
                    }
                }
                $result[$value] = array();
                $result[$value]['type'] = 'file';
                $result[$value]['path'] = $path;
                $result[$value]['value'] = $value;
            }
        }
    }
    return $result;
}
开发者ID:promil23,项目名称:GetSimpleCMS,代码行数:47,代码来源:basic.php


示例6: _id

/**
 * Clean ID
 *
 * Removes characters that don't work in URLs or IDs
 * 
 * @param string $text
 * @return string
 */
function _id($text)
{
    $text = to7bit($text, "UTF-8");
    $text = clean_url($text);
    $text = preg_replace('/[[:cntrl:]]/', '', $text);
    //remove control characters that cause interface to choke
    return lowercase($text);
}
开发者ID:Kevinf63,项目名称:KevPortfolio,代码行数:16,代码来源:basic.php


示例7: genStdThumb

function genStdThumb($path, $name)
{
    if (!defined('GSIMAGEWIDTH')) {
        $width = 200;
        //New width of image
    } else {
        $width = GSIMAGEWIDTH;
    }
    $ext = lowercase(pathinfo($name, PATHINFO_EXTENSION));
    if ($ext == 'jpg' || $ext == 'jpeg' || $ext == 'gif' || $ext == 'png') {
        $thumbsPath = GSTHUMBNAILPATH . $path;
        if (!file_exists($thumbsPath)) {
            if (defined('GSCHMOD')) {
                $chmod_value = GSCHMOD;
            } else {
                $chmod_value = 0755;
            }
            mkdir($thumbsPath, $chmod_value);
        }
    }
    $targetFile = GSDATAUPLOADPATH . $path . $name;
    //thumbnail for post
    $imgsize = getimagesize($targetFile);
    switch (lowercase(substr($targetFile, -3))) {
        case "jpg":
            $image = imagecreatefromjpeg($targetFile);
            break;
        case "png":
            $image = imagecreatefrompng($targetFile);
            break;
        case "gif":
            $image = imagecreatefromgif($targetFile);
            break;
        default:
            exit;
            break;
    }
    $height = $imgsize[1] / $imgsize[0] * $width;
    //This maintains proportions
    $src_w = $imgsize[0];
    $src_h = $imgsize[1];
    $picture = imagecreatetruecolor($width, $height);
    imagealphablending($picture, false);
    imagesavealpha($picture, true);
    $bool = imagecopyresampled($picture, $image, 0, 0, 0, 0, $width, $height, $src_w, $src_h);
    if ($bool) {
        $thumbnailFile = $thumbsPath . "thumbnail." . $name;
        switch (lowercase(substr($targetFile, -3))) {
            case "jpg":
                $bool2 = imagejpeg($picture, $thumbnailFile, 85);
                break;
            case "png":
                imagepng($picture, $thumbnailFile);
                break;
            case "gif":
                imagegif($picture, $thumbnailFile);
                break;
        }
    }
    imagedestroy($picture);
    imagedestroy($image);
}
开发者ID:google-code-backups,项目名称:get-simple-cms,代码行数:62,代码来源:image.php


示例8: clean_title

function clean_title($d)
{
    $nb = "&nbsp;";
    $d = htmlentities($d);
    $d = html_entity_decode_b($d);
    $d = html_entity_decode($d);
    //$d=clean_acc($d);
    //$d=utflatindecode($d);
    $d = clean_punct_b($d);
    $d = lowercase($d);
    if (substr($d, -1) == '"') {
        $d = substr($d, 0, -1) . $nb . '»';
    }
    if (substr($d, 0, 1) == '"') {
        $d = '«' . $nb . substr($d, 1);
    }
    $d = str_replace(' "', ' «' . $nb, $d);
    $d = str_replace(array('" ', '"'), $nb . '» ', $d);
    $d = ereg_replace("[ ]{2,}", ' ', $d);
    //$d=clean_punct($d);//add clean_acc
    //$d=unescape($d);
    return trim($d);
}
开发者ID:philum,项目名称:cms,代码行数:23,代码来源:lib.php


示例9: imagedestroy

 imagedestroy($picture);
 imagedestroy($image);
 //small thumbnail for image preview
 $width = 65;
 //New width of image
 $height = $imgsize[1] / $imgsize[0] * $width;
 //This maintains proportions
 $src_w = $imgsize[0];
 $src_h = $imgsize[1];
 $picture = imagecreatetruecolor($width, $height);
 imagealphablending($picture, false);
 imagesavealpha($picture, true);
 $bool = imagecopyresampled($picture, $image, 0, 0, 0, 0, $width, $height, $src_w, $src_h);
 if ($bool) {
     $thumbsmFile = $thumbsPath . "thumbsm." . $name;
     switch (lowercase(substr($targetFile, -3))) {
         case "jpg":
             header("Content-Type: image/jpeg");
             $bool2 = imagejpeg($picture, $thumbsmFile, 85);
             break;
         case "png":
             header("Content-Type: image/png");
             imagepng($picture, $thumbsmFile);
             break;
         case "gif":
             header("Content-Type: image/gif");
             imagegif($picture, $thumbsmFile);
             break;
     }
 }
 imagedestroy($picture);
开发者ID:Emmett-Brown,项目名称:linea,代码行数:31,代码来源:upload-uploadify.php


示例10: get_FileType

/**
 * File Type Category
 *
 * Returns the category of an file based on it's extension
 *
 * @since 1.0
 * @uses i18n_r
 *
 * @param string $ext
 * @return string
 */
function get_FileType($ext)
{
    $ext = lowercase($ext);
    if ($ext == 'jpg' || $ext == 'jpeg' || $ext == 'pct' || $ext == 'gif' || $ext == 'bmp' || $ext == 'png') {
        return i18n_r('IMAGES') . ' Images';
    } elseif ($ext == 'zip' || $ext == 'gz' || $ext == 'rar' || $ext == 'tar' || $ext == 'z' || $ext == '7z' || $ext == 'pkg') {
        return i18n_r('FTYPE_COMPRESSED');
    } elseif ($ext == 'ai' || $ext == 'psd' || $ext == 'eps' || $ext == 'dwg' || $ext == 'tif' || $ext == 'tiff' || $ext == 'svg') {
        return i18n_r('FTYPE_VECTOR');
    } elseif ($ext == 'swf' || $ext == 'fla') {
        return i18n_r('FTYPE_FLASH');
    } elseif ($ext == 'mov' || $ext == 'mpg' || $ext == 'avi' || $ext == 'mpeg' || $ext == 'rm' || $ext == 'wmv') {
        return i18n_r('FTYPE_VIDEO');
    } elseif ($ext == 'mp3' || $ext == 'wav' || $ext == 'wma' || $ext == 'midi' || $ext == 'mid' || $ext == 'm3u' || $ext == 'ra' || $ext == 'aif') {
        return i18n_r('FTYPE_AUDIO');
    } elseif ($ext == 'php' || $ext == 'phps' || $ext == 'asp' || $ext == 'xml' || $ext == 'js' || $ext == 'jsp' || $ext == 'sql' || $ext == 'css' || $ext == 'htm' || $ext == 'html' || $ext == 'xhtml' || $ext == 'shtml') {
        return i18n_r('FTYPE_WEB');
    } elseif ($ext == 'mdb' || $ext == 'accdb' || $ext == 'pdf' || $ext == 'xls' || $ext == 'xlsx' || $ext == 'csv' || $ext == 'tsv' || $ext == 'ppt' || $ext == 'pps' || $ext == 'pptx' || $ext == 'txt' || $ext == 'log' || $ext == 'dat' || $ext == 'text' || $ext == 'doc' || $ext == 'docx' || $ext == 'rtf' || $ext == 'wks') {
        return i18n_r('FTYPE_DOCUMENTS');
    } elseif ($ext == 'exe' || $ext == 'msi' || $ext == 'bat' || $ext == 'download' || $ext == 'dll' || $ext == 'ini' || $ext == 'cab' || $ext == 'cfg' || $ext == 'reg' || $ext == 'cmd' || $ext == 'sys') {
        return i18n_r('FTYPE_SYSTEM');
    } else {
        return i18n_r('FTYPE_MISC');
    }
}
开发者ID:Emmett-Brown,项目名称:linea,代码行数:36,代码来源:template_functions.php


示例11: bm_admin_panel

function bm_admin_panel()
{
    global $PRETTYURLS, $BMPRETTYURLS;
    $books = bm_get_books(true);
    ?>
  <h3 class="floated"><?php 
    i18n('books_manager/PLUGIN_NAME');
    ?>
</h3>
  
  <div class="edit-nav clearfix">
    <a href="#" id="filter-button" ><?php 
    i18n('FILTER');
    ?>
</a>
    
    <a href="load.php?id=books_manager&edit"><?php 
    i18n('books_manager/NEW_BOOK');
    ?>
</a>
    
    <a href="load.php?id=books_manager&settings"><?php 
    i18n('books_manager/SETTINGS');
    ?>
</a>
    
  </div>
  
  <?php 
    if (!empty($books)) {
        ?>
    <div id="filter-search">
      <form>
        <input type="text" class="text" id="tokens" placeholder="<?php 
        echo lowercase(i18n_r('FILTER'));
        ?>
..." />
        &nbsp;
        <a href="load.php?id=books_manager" class="cancel"><?php 
        i18n('books_manager/CANCEL');
        ?>
</a>
      </form>
    </div>
    <table id="books" class="highlight">
    <tr>

      <th><?php 
        i18n('books_manager/BOOK_TITLE');
        ?>
</th>
      <th style="text-align: right;"><?php 
        i18n('books_manager/DATE');
        ?>
</th>
      <th></th>
      <th></th>
      <th></th>
    </tr>
    <?php 
        foreach ($books as $book) {
            $title = cl($book->title);
            $date = shtDate($book->date);
            $url = bm_get_url('book') . $book->slug;
            ?>
      <tr>
        <td class="booktitle">
           <a href="load.php?id=books_manager&edit=<?php 
            echo $book->slug;
            ?>
" title="<?php 
            i18n('books_manager/EDIT_BOOK');
            ?>
: <?php 
            echo $title;
            ?>
">
            <?php 
            echo $title;
            ?>
          </a>
        </td>
        <td style="text-align: right;">
          <span><?php 
            echo $date;
            ?>
</span>
        </td>
        <td style="width: 20px;text-align: center;">
          <?php 
            if ($book->private == 'Y') {
                echo '<span style="color: #aaa;">P</span>';
            }
            ?>
        </td>
        <td class="secondarylink">

          <a href="<?php 
            echo $url;
            ?>
//.........这里部分代码省略.........
开发者ID:abdelaithadji,项目名称:books_manager,代码行数:101,代码来源:admin.php


示例12: nm_lowercase_tags

function nm_lowercase_tags($str)
{
    if (defined('NMLOWERCASETAGS') && NMLOWERCASETAGS) {
        return lowercase($str);
    } else {
        return $str;
    }
}
开发者ID:Vin985,项目名称:clqweb,代码行数:8,代码来源:functions.php


示例13: i18n_r

			<?php 
if (!$log_data) {
    echo '<p><em>' . i18n_r('LOG_FILE_EMPTY') . '</em></p>';
}
?>
			<ol class="more" >
				<?php 
$count = 1;
if ($log_data) {
    foreach ($log_data as $log) {
        echo '<li><p style="font-size:11px;line-height:15px;" ><b style="line-height:20px;" >' . i18n_r('LOG_FILE_ENTRY') . '</b><br />';
        foreach ($log->children() as $child) {
            $name = $child->getName();
            echo '<b>' . stripslashes(ucwords($name)) . '</b>: ';
            $d = $log->{$name};
            $n = lowercase($child->getName());
            $ip_regex = '/^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:[.](?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$/';
            $url_regex = @"((https?|ftp|gopher|telnet|file|notes|ms-help):((//)|(\\\\))+[\\w\\d:#@%/;\$()~_?\\+-=\\\\.&]*)";
            //check if its an url address
            if (do_reg($d, $url_regex)) {
                $d = '<a href="' . $d . '" target="_blank" >' . $d . '</a>';
            }
            //check if its an ip address
            if (do_reg($d, $ip_regex)) {
                if ($d == $_SERVER['REMOTE_ADDR']) {
                    $d = i18n_r('THIS_COMPUTER') . ' (<a href="' . $whois_url . $d . '" target="_blank" >' . $d . '</a>)';
                } else {
                    $d = '<a href="' . $whois_url . $d . '" target="_blank" >' . $d . '</a>';
                }
            }
            //check if its an email address
开发者ID:Foltys,项目名称:Masopust,代码行数:31,代码来源:log.php


示例14: editor_array2ul

/**
 * outputs a ul nested tree from directory array
 * @param  array   $array     directoryToMultiArray()
 * @param  boolean $hideEmpty omit empty directories if true
 * @return string
 */
function editor_array2ul($array, $hideEmpty = true, $recurse = true)
{
    global $allowed_extensions, $template_file, $template;
    $cnt = 0;
    $out = "<ul>";
    foreach ($array as $key => $elem) {
        if (!is_array($elem['value'])) {
            // Is a file
            $ext = lowercase(pathinfo($elem['value'], PATHINFO_EXTENSION));
            if (in_array($ext, $allowed_extensions)) {
                $filename = $elem['value'];
                $filepath = $elem['path'];
                $filenamefull = substr(strstr($filepath . $filename, getRelPath(GSTHEMESPATH) . $template . '/'), strlen(getRelPath(GSTHEMESPATH) . $template . '/'));
                $open = editor_fileIsOpen($elem['path'], $elem['value']) ? ' open' : '';
                if ($filename == GSTEMPLATEFILE) {
                    $ext = 'theme';
                    $filename = i18n_r('DEFAULT_TEMPLATE');
                }
                $link = myself(false) . '?t=' . $template . '&amp;f=' . $filenamefull;
                $out .= '<li><a href="' . $link . '"class="file ext-' . $ext . $open . '">' . $filename . "</a></li>";
            }
        } else {
            if ($recurse) {
                // Is a folder
                // Are we showing/hiding empty folders.
                // WILL NOT hide empty folders that contain at least 1 subfolder
                $empty = '';
                if (count($elem['value']) == 0) {
                    if ($hideEmpty) {
                        continue;
                    }
                    $empty = ' dir-empty';
                    // empty folder class
                }
                $out .= '<li><a class="directory' . $empty . '">' . $key . '</a>' . editor_array2ul($elem['value']) . '</li>';
            }
        }
    }
    $out = $out . "</ul>";
    return $out;
}
开发者ID:promil23,项目名称:GetSimpleCMS,代码行数:47,代码来源:theme-edit.php


示例15: lowercase

<html>
<?php 
if (isset($_GET['sentence'])) {
    $string = $_GET['sentence'];
    $result = lowercase($string);
    echo $result;
}
function lowercase($string)
{
    $length = strlen($string);
    $low = " ";
    for ($i = 0; $i < $length; $i++) {
        if (ord($string[$i]) >= ord('A') && ord($string[$i]) <= ord('Z')) {
            $str = chr(ord($string[$i]) + ord('a') - ord('A'));
        } else {
            $str = $string[$i];
        }
        $low .= $str;
    }
    return $low;
}
?>

	<body>
		<form action = "lowercasefunction.php" method="get">
			Given string:<input type="text" name="sentence"/>
		<br>
		<button type="submit">click here</button>
	
		</form>
	</body>
开发者ID:polycste,项目名称:my_function,代码行数:31,代码来源:lowercasefunction.php


示例16: i18n

	<div id="maincontent">
		<div class="main">
			<h3 class="floated"><?php 
i18n('PAGE_MANAGEMENT');
?>
</h3>
			<div class="edit-nav clearfix" ><p><a href="#" id="filtertable" ><?php 
i18n('FILTER');
?>
</a><a href="#" id="show-characters" ><?php 
i18n('TOGGLE_STATUS');
?>
</a></div>
			<div id="filter-search">
				<form><input type="text" autocomplete="off" class="text" id="q" placeholder="<?php 
echo lowercase(i18n_r('FILTER'));
?>
..." /> &nbsp; <a href="pages.php" class="cancel"><?php 
i18n('CANCEL');
?>
</a></form>
			</div>
			<table id="editpages" class="edittable highlight paginate">
				<tr><th><?php 
i18n('PAGE_TITLE');
?>
</th><th style="text-align:right;" ><?php 
i18n('DATE');
?>
</th><th></th><th></th></tr>
				<?php 
开发者ID:kazu2012,项目名称:get-simple-ja,代码行数:31,代码来源:pages.php


示例17: __inner_dispatch

 function __inner_dispatch($cap, $data)
 {
     $controllerName = '';
     $actionName = '';
     $params = array();
     // If the cap triad is empty, fall back to the REQUEST url, then to the default route
     if (empty($cap)) {
         $cap = isset($_REQUEST['slab_url']) ? $_REQUEST['slab_url'] : $this->config->get('app.default_route');
     }
     if (empty($cap)) {
         e('No valid route was found. Make sure that the app.default_route setting is properly configured.');
         die;
     }
     $this->pageLogger->log('inner_dispatch', 'start', "Route: {$cap}");
     // get rid of the preceding '/'
     if (strpos($cap, '/') === 0) {
         $cap = substr($cap, 1);
     }
     // Extract the controller name, action name, and parameters from the cap
     $route = explode('/', $cap);
     if (count($route) >= 1) {
         $controllerName = lowercase($route[0]);
     }
     if (count($route) >= 2) {
         $actionName = lowercase($route[1]);
     }
     if (empty($actionName)) {
         $actionName = 'index';
     }
     if (count($route) >= 3) {
         $params = array_slice($route, 2);
     }
     // Load and create an instance of the controller
     $controller =& $this->controllerLoader->load_controller($controllerName, $actionName, $params, $data);
     if (!is_object($controller)) {
         throw new Exception('Error loading controller');
     }
     // if the Cookie component is loaded, call init_cookie() (as the cookie must be initialised before
     // Session::before_action() is called below)
     if (isset($controller->Cookie)) {
         $controller->Cookie->init_cookie();
     }
     // call the components before_action and before_filter
     foreach (array_keys($controller->componentRefs) as $k) {
         $controller->componentRefs[$k]->before_action();
         $controller->componentRefs[$k]->before_filter();
     }
     try {
         $controller->before_action();
         $controller->before_filter();
         $controller->dispatch_method($actionName, $params);
         $controller->after_action();
         $controller->after_filter();
     } catch (Exception $ex) {
         $controller->ajax_error($ex->getMessage());
     }
     // call the components after_action and after_filter
     foreach (array_values($controller->componentRefs) as $c) {
         $c->after_action();
         $c->after_filter();
     }
     $this->pageLogger->log('inner_dispatch', 'end', "Route: {$cap}");
     return $controller;
 }
开发者ID:slab-php,项目名称:slab,代码行数:64,代码来源:dispatcher.php


示例18: create_pluginsxml

/**
 * create_pluginsxml
 * 
 * If the plugins.xml file does not exists, read in each plugin 
 * and add it to the file. 
 * read_pluginsxml() is called again to repopulate $live_plugins
 *
 * @since 2.04
 * @uses $live_plugins
 *
 */
function create_pluginsxml($force = false)
{
    global $live_plugins;
    if (file_exists(GSPLUGINPATH)) {
        $pluginfiles = getFiles(GSPLUGINPATH);
    }
    $phpfiles = array();
    foreach ($pluginfiles as $fi) {
        if (lowercase(pathinfo($fi, PATHINFO_EXTENSION)) == 'php') {
            $phpfiles[] = $fi;
        }
    }
    if (!$force) {
        $livekeys = array_keys($live_plugins);
        if (count(array_diff($livekeys, $phpfiles)) > 0 || count(array_diff($phpfiles, $livekeys)) > 0) {
            $force = true;
        }
    }
    if ($force) {
        $xml = @new SimpleXMLExtended('<?xml version="1.0" encoding="UTF-8"?><channel></channel>');
        foreach ($phpfiles as $fi) {
            $plugins = $xml->addChild('item');
            $p_note = $plugins->addChild('plugin');
            $p_note->addCData($fi);
            $p_note = $plugins->addChild('enabled');
            if (isset($live_plugins[(string) $fi])) {
                $p_note->addCData($live_plugins[(string) $fi]);
            } else {
                $p_note->addCData('false');
            }
        }
        XMLsave($xml, GSDATAOTHERPATH . "plugins.xml");
        read_pluginsxml();
    }
}
开发者ID:elephantcode,项目名称:elephantcode,代码行数:46,代码来源:plugin_functions.php


示例19: formatWildcard

 /**
  * Adds % wildcards to the given string
  *
  * @param      $str
  * @param bool $lowercase
  *
  * @return string
  */
 public function formatWildcard($str, $lowercase = true)
 {
     if ($lowercase) {
         $str = lowercase($str);
     }
     return preg_replace('\\s+', '%', $str);
 }
开发者ID:khaidirh,项目名称:laravel4-datatables-package,代码行数:15,代码来源:Datatables.php


示例20: tagsToAry

/**
 * return tags string as array
 * explodes on delim, lowers case, and trims keyword strings
 * @since 3.4
 * @param string $str string of delimited keywords
 * @param bool	$case preserve case if true, else lower
 * @param str	$delim delimiter for splitting
 * @return array      returns array of tags
 */
function tagsToAry($str, $case = false, $delim = ',')
{
    if (!$case) {
        $str = lowercase($str);
    }
    $ary = explode($delim, $str);
    $ary = array_map('trim', $ary);
    return $ary;
}
开发者ID:kix23,项目名称:GetSimpleCMS,代码行数:18,代码来源:basic.php



注:本文中的lowercase函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP lrdd函数代码示例发布时间:2022-05-15
下一篇:
PHP low_flatten_results函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap