add xml response, add doc and refactor

This commit is contained in:
stubbfel
2013-06-25 13:32:00 +02:00
parent 8fb78ca082
commit 858758ccc9
8 changed files with 374 additions and 55 deletions

View File

@@ -0,0 +1,35 @@
<?php
namespace utiliy;
include_once "../../global.inc.php";
/**
* The StringManager provides some string-methods
* @author stubbfel
* @since 25.06.2013
*/
class StringManager {
/**
* Method check if a certain string start with a certain sustring
* @param string $haystack
* @param string $needle
* @return boolean
*/
public static function startsWith($haystack, $needle) {
return !strncmp($haystack, $needle, strlen($needle));
}
/**
* Method check if a certain string end with a certain sustring
* @param string $haystack
* @param string $needle
* @return boolean
*/
public static function endsWith($haystack, $needle) {
return (substr($haystack, -strlen($needle)) === $needle);
}
}
?>