Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Thursday, October 15, 2026

Diff for phpWebFileManager/lib/Attic/fnc.append_slash.php between version 1.1 and 1.2

version 1.1, 2002/04/20 23:03:15 version 1.2, 2002/04/21 23:23:43
Line 1 
Line 1 
 <?php  <?php
   
 /*  /*
  * append_slash()   * phpPlatonLib - Platon software development group PHP library
  *   *
  * Appends slash at the end of string if string is not empty and slash   * common/str/fnc.append_slash.php - append slash at the end of
  * is not already present at the end of string.   * string if it is not empty and slash is not already present at
  * On success returns changed string, on failure returns false;   * the end of string; return changed string on success, on
    * failure returns false
    * ____________________________________________________________
    *
    * Developed by Ondrej Jombik <nepto@pobox.sk>
    * Copyright (c) 2001-2002 Platon SDG, http://www.platon.sk/
    * All rights reserved.
    *
    * See README file for more information about this software.
    * See COPYING file for license information.
    *
    * Download the latest version from
    * http://www.platon.sk/projects/phpPlatonLib/
  */   */
   
 function append_slash($string, $char = '/')  /* $Id$ */
 {  
         if (! is_string($string) || ! is_string($char))  if (! defined('phpPlatonLib_fnc_append_slash')) {
                 return false;          define('phpPlatonLib_fnc_append_slash', 1);
   
         if (strlen($string) > 0) {          function append_slash($string, $char = '/')
                 if ($string[strlen($string) - 1] != $char[0])          {
                         $string .= $char[0];                  if (! is_string($string) || ! is_string($char))
                           return false;
   
                   if (strlen($string) > 0) {
                           if ($string[strlen($string) - 1] != $char[0])
                                   $string .= $char[0];
                   }
   
                   return $string;
         }          }
   
         return $string;  
 }  }
   
 ?>  ?>

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top