Changeset 940 for trunk/common/string.php
- Timestamp:
- 11/05/08 18:16:54 (4 years ago)
- File:
-
- 1 edited
-
trunk/common/string.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/common/string.php
r922 r940 1 1 <?php 2 2 3 // Various string processing functions.3 // Various string processing functions. 4 4 5 5 function starts_with($s, $substr) { 6 log_assert(is_string($s) && is_string($substr)); 6 7 return substr($s, 0, strlen($substr)) == $substr; 7 8 } 8 9 9 10 function ends_with($s, $substr) { 11 log_assert(is_string($s) && is_string($substr)); 10 12 return substr($s, -strlen($substr)) == $substr; 11 13 }
Note: See TracChangeset
for help on using the changeset viewer.
![[infoarena] development](/chrome/site/logo.png)