Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 0 additions & 37 deletions CRM/Utils/String.php
Original file line number Diff line number Diff line change
Expand Up @@ -750,43 +750,6 @@ public static function maskEmail($email, $maskChar = '*', $percent = 50) {
return ($masked . '@' . $domain);
}

/**
* This function compares two strings.
*
* @param string $strOne
* String one.
* @param string $strTwo
* String two.
* @param bool $case
* Boolean indicating whether you want the comparison to be case sensitive or not.
*
* @return bool
* TRUE (string are identical); FALSE (strings are not identical)
*/
public static function compareStr($strOne, $strTwo, $case) {
if ($case == TRUE) {
// Convert to lowercase and trim white spaces
if (strtolower(trim($strOne)) == strtolower(trim($strTwo))) {
// yes - they are identical
return TRUE;
}
else {
// not identical
return FALSE;
}
}
if ($case == FALSE) {
// Trim white spaces
if (trim($strOne) == trim($strTwo)) {
// yes - they are identical
return TRUE;
}
else {
// not identical
return FALSE;
}
}
}

/**
* Many parts of the codebase have a convention of internally passing around
Expand Down