Project

General

Profile

« Previous | Next » 

Revision 8361

web/main/util.php: Added coalesce()

View differences:

web/main/util.php
1 1
<?php
2
function coalesce($value, $empty) { return isset($value) ? $value : $empty; }
3

  
2 4
function starts_with($str, $prefix)
3 5
{
4 6
	return substr($str, 0, strlen($prefix)) === $prefix;

Also available in: Unified diff