code: public static boolean stringEquals(@Nullable final String pStr1, @Nullable final String pStr2,
          final boolean pCaseSensitive)
      {
          boolean result = false;
          if (pStr1 == null && pStr2 == null) {
              result = true;
          }
          else if (pStr1 != null) {
              if (pCaseSensitive) {
                  result = pStr1.equals(pStr2);
              }
              else {
                  result = pStr1.equalsIgnoreCase(pStr2);
              }
          }
          return result;
      }
docs: Determine the equality of two Strings, optionally ignoring case.
  
  @param pStr1 the first String
  @param pStr2 the second String
  @param pCaseSensitive if the comparison should be case sensitive
  @return <code>true</code> if the String are equal, <code>false</code> otherwise