code: public AsciiString toUpperCase() {
          boolean uppercased = true;
          int i, j;
          final int len = length() + arrayOffset();
          for (i = arrayOffset(); i < len; ++i) {
              byte b = value[i];
              if (b >= 'a' && b <= 'z') {
                  uppercased = false;
                  break;
              }
          }
  
          // Check if this string does not contain any lowercase characters.
          if (uppercased) {
              return this;
          }
  
          final byte[] newValue = PlatformDependent.allocateUninitializedArray(length());
          for (i = 0, j = arrayOffset(); i < newValue.length; ++i, ++j) {
              newValue[i] = toUpperCase(value[j]);
          }
  
          return new AsciiString(newValue, false);
      }
docs: Converts the characters in this string to uppercase, using the default Locale.
  
  @return a new string containing the uppercase characters equivalent to the characters in this string.