mirror of
https://github.com/standardebooks/web.git
synced 2025-07-12 17:42:29 -04:00
Add system to retrieve and manage donations in a local database
This commit is contained in:
parent
79c531aacb
commit
70a80d0e02
46 changed files with 782 additions and 910 deletions
|
@ -21,10 +21,10 @@ class Formatter{
|
|||
$text = mb_strtolower(trim($text));
|
||||
|
||||
// Then convert any non-digit, non-letter character to a space
|
||||
$text = preg_replace('/[^0-9a-zA-Z]/ius', ' ', $text) ?: '';
|
||||
$text = preg_replace('/[^0-9a-zA-Z]/ius', ' ', $text);
|
||||
|
||||
// Then convert any instance of one or more space to dash
|
||||
$text = preg_replace('/\s+/ius', '-', $text) ?: '';
|
||||
$text = preg_replace('/\s+/ius', '-', $text);
|
||||
|
||||
// Finally, trim dashes
|
||||
$text = trim($text, '-');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue