protected function WKT::trimParens in geoPHP 7
Same name and namespace in other branches
- 8 geoPHP/lib/adapters/WKT.class.php \WKT::trimParens()
Trim the parenthesis and spaces
7 calls to WKT::trimParens()
- WKT::parseGeometryCollection in geoPHP/
lib/ adapters/ WKT.class.php - WKT::parseLineString in geoPHP/
lib/ adapters/ WKT.class.php - WKT::parseMultiLineString in geoPHP/
lib/ adapters/ WKT.class.php - WKT::parseMultiPoint in geoPHP/
lib/ adapters/ WKT.class.php - WKT::parseMultiPolygon in geoPHP/
lib/ adapters/ WKT.class.php
File
- geoPHP/
lib/ adapters/ WKT.class.php, line 183
Class
- WKT
- WKT (Well Known Text) Adapter
Code
protected function trimParens($str) {
$str = trim($str);
// We want to only strip off one set of parenthesis
if ($this
->beginsWith($str, '(')) {
return substr($str, 1, -1);
}
else {
return $str;
}
}