Class SLPString

java.lang.Object
org.sblim.slp.internal.SLPString

public class SLPString extends Object
 This class provides functions for comparison of SLP message strings.
 
 From RFC 2608:
 
 String comparison for order and equality in SLP MUST be case
 insensitive inside the 0x00-0x7F subrange of UTF-8 (which corresponds
 to ASCII character encoding).  Case insensitivity SHOULD be supported
 throughout the entire UTF-8 encoded Unicode [6] character set.
 
 The case insensitivity rule applies to all string matching in SLPv2,
 including Scope strings, SLP SPI strings, service types, attribute
 tags and values in query handling, language tags, previous responder
 lists.  Comparisons of URL strings, however, is case sensitive.
 
 White space (SPACE, CR, LF, TAB) internal to a string value is folded
 to a single SPACE character for the sake of string comparisons.
 White space preceding or following a string value is ignored for the
 purposes of string comparison.  For example, "  Some String  "
 matches "SOME    STRING".
 
  • Constructor Details

    • SLPString

      public SLPString()
  • Method Details

    • equals

      public static boolean equals(String pStr0, String pStr1)
      equals
      Parameters:
      pStr0 -
      pStr1 -
      Returns:
      boolean
    • compare

      public static int compare(String pStr0, String pStr1)
      compare
      Parameters:
      pStr0 -
      pStr1 -
      Returns:
      int
    • unify

      public static String unify(String pStr)
      public for testing only.
      Parameters:
      pStr -
      Returns:
      String