Class LDUtil

java.lang.Object
com.launchdarkly.sdk.android.LDUtil

public class LDUtil extends Object
Various utility functions
  • Constructor Details

    • LDUtil

      public LDUtil()
  • Method Details

    • validateStringValue

      @Nullable public static String validateStringValue(@NonNull String s)
      Parameters:
      s - the string to validate
      Returns:
      null if valid, otherwise string describing issue
    • sanitizeSpaces

      public static String sanitizeSpaces(String s)
      Replaces spaces with hyphens. In the future, if this function is made more generic, understand that customer data may already exist and changing this sanitization may have adverse consequences.
      Parameters:
      s - the string to sanitize
      Returns:
      the sanitized string
    • urlSafeBase64HashedContextId

      public static String urlSafeBase64HashedContextId(LDContext context)