Class NSMutableString

    • Constructor Detail

      • NSMutableString

        protected NSMutableString​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

        public static NSMutableString allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(@NotNull
                                                                   @NotNull java.lang.String key)
      • availableStringEncodings

        @NotNull
        public static @NotNull org.moe.natj.general.ptr.ConstNUIntPtr availableStringEncodings()
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(@NotNull
                                                                   @NotNull java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(@NotNull
                                                                                 @NotNull java.lang.Object aTarget,
                                                                                 @NotNull
                                                                                 @NotNull org.moe.natj.objc.SEL aSelector,
                                                                                 @Nullable
                                                                                 @Nullable java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        @NotNull
        public static @NotNull NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        @NotNull
        public static @NotNull org.moe.natj.objc.Class classForKeyedUnarchiver()
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • defaultCStringEncoding

        public static long defaultCStringEncoding()
      • description_static

        public static java.lang.String description_static()
      • hash_static

        public static long hash_static()
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • keyPathsForValuesAffectingValueForKey

        @NotNull
        public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(@NotNull
                                                                                             @NotNull java.lang.String key)
      • localizedNameOfStringEncoding

        @NotNull
        public static @NotNull java.lang.String localizedNameOfStringEncoding​(long encoding)
      • localizedStringWithFormat

        @NotNull
        public static @NotNull NSMutableString localizedStringWithFormat​(@NotNull
                                                                         @NotNull java.lang.String format,
                                                                         java.lang.Object... varargs)
      • localizedUserNotificationStringForKeyArguments

        @NotNull
        public static @NotNull java.lang.String localizedUserNotificationStringForKeyArguments​(@NotNull
                                                                                               @NotNull java.lang.String key,
                                                                                               @Nullable
                                                                                               @Nullable NSArray<?> arguments)
      • pathWithComponents

        @NotNull
        public static @NotNull java.lang.String pathWithComponents​(@NotNull
                                                                   @NotNull NSArray<java.lang.String> components)
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • stringEncodingForDataEncodingOptionsConvertedStringUsedLossyConversion

        public static long stringEncodingForDataEncodingOptionsConvertedStringUsedLossyConversion​(@NotNull
                                                                                                  @NotNull NSData data,
                                                                                                  @Nullable
                                                                                                  @Nullable NSDictionary<java.lang.String,​?> opts,
                                                                                                  @Nullable
                                                                                                  @Nullable org.moe.natj.general.ptr.Ptr<NSString> string,
                                                                                                  @Nullable
                                                                                                  @Nullable org.moe.natj.general.ptr.BoolPtr usedLossyConversion)
      • stringWithCString

        @Deprecated
        public static NSMutableString stringWithCString​(@NotNull
                                                        @NotNull org.moe.natj.general.ptr.ConstBytePtr bytes)
        Deprecated.
      • stringWithCStringEncoding

        public static NSMutableString stringWithCStringEncoding​(@NotNull
                                                                @NotNull org.moe.natj.general.ptr.ConstBytePtr cString,
                                                                long enc)
      • stringWithCStringLength

        @Deprecated
        public static NSMutableString stringWithCStringLength​(@NotNull
                                                              @NotNull org.moe.natj.general.ptr.ConstBytePtr bytes,
                                                              long length)
        Deprecated.
      • stringWithCapacity

        @NotNull
        public static @NotNull NSMutableString stringWithCapacity​(long capacity)
      • stringWithCharactersLength

        public static NSMutableString stringWithCharactersLength​(@NotNull
                                                                 @NotNull org.moe.natj.general.ptr.ConstCharPtr characters,
                                                                 long length)
      • stringWithContentsOfFile

        @Deprecated
        public static NSMutableString stringWithContentsOfFile​(@NotNull
                                                               @NotNull java.lang.String path)
        Deprecated.
      • stringWithContentsOfFileEncodingError

        public static NSMutableString stringWithContentsOfFileEncodingError​(@NotNull
                                                                            @NotNull java.lang.String path,
                                                                            long enc,
                                                                            @Nullable
                                                                            @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
      • stringWithContentsOfFileUsedEncodingError

        public static NSMutableString stringWithContentsOfFileUsedEncodingError​(@NotNull
                                                                                @NotNull java.lang.String path,
                                                                                @Nullable
                                                                                @Nullable org.moe.natj.general.ptr.NUIntPtr enc,
                                                                                @Nullable
                                                                                @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
      • stringWithContentsOfURL

        @Deprecated
        public static NSMutableString stringWithContentsOfURL​(@NotNull
                                                              @NotNull NSURL url)
        Deprecated.
      • stringWithContentsOfURLEncodingError

        public static NSMutableString stringWithContentsOfURLEncodingError​(@NotNull
                                                                           @NotNull NSURL url,
                                                                           long enc,
                                                                           @Nullable
                                                                           @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
      • stringWithContentsOfURLUsedEncodingError

        public static NSMutableString stringWithContentsOfURLUsedEncodingError​(@NotNull
                                                                               @NotNull NSURL url,
                                                                               @Nullable
                                                                               @Nullable org.moe.natj.general.ptr.NUIntPtr enc,
                                                                               @Nullable
                                                                               @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
      • stringWithFormat

        public static NSMutableString stringWithFormat​(@NotNull
                                                       @NotNull java.lang.String format,
                                                       java.lang.Object... varargs)
      • stringWithString

        public static NSMutableString stringWithString​(@NotNull
                                                       @NotNull java.lang.String string)
      • stringWithUTF8String

        public static NSMutableString stringWithUTF8String​(@NotNull
                                                           @NotNull org.moe.natj.general.ptr.ConstBytePtr nullTerminatedCString)
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • supportsSecureCoding

        public static boolean supportsSecureCoding()
      • version_static

        public static long version_static()
      • appendFormat

        public void appendFormat​(@NotNull
                                 @NotNull java.lang.String format,
                                 java.lang.Object... varargs)
      • appendString

        public void appendString​(@NotNull
                                 @NotNull java.lang.String aString)
      • applyTransformReverseRangeUpdatedRange

        public boolean applyTransformReverseRangeUpdatedRange​(@NotNull
                                                              @NotNull java.lang.String transform,
                                                              boolean reverse,
                                                              NSRange range,
                                                              @Nullable
                                                              @Nullable NSRange resultingRange)
        Perform string transliteration. The transformation represented by transform is applied to the given range of string in place. Only the specified range will be modified, but the transform may look at portions of the string outside that range for context. If supplied, resultingRange is modified to reflect the new range corresponding to the original range. reverse indicates that the inverse transform should be used instead, if it exists. Attempting to use an invalid transform identifier or reverse an irreversible transform will return NO; otherwise YES is returned, even if no characters are actually transformed. You can pass one of the predefined transforms listed above (NSStringTransformLatinToKatakana, etc), or any valid ICU transform ID as defined in the ICU User Guide. Arbitrary ICU transform rules are not supported. API-Since: 9.0
      • deleteCharactersInRange

        public void deleteCharactersInRange​(NSRange range)
      • init

        public NSMutableString init()
        Description copied from class: NSString
        The initializers available to subclasses. See further below for additional init methods.
        Overrides:
        init in class NSString
      • initWithCString

        @Deprecated
        public NSMutableString initWithCString​(@NotNull
                                               @NotNull org.moe.natj.general.ptr.ConstBytePtr bytes)
        Deprecated.
        Description copied from class: NSString
        API-Since: 2.0 Deprecated-Since: 2.0 Deprecated-Message: Use -initWithCString:encoding: instead
        Overrides:
        initWithCString in class NSString
      • initWithCStringLength

        @Deprecated
        public NSMutableString initWithCStringLength​(@NotNull
                                                     @NotNull org.moe.natj.general.ptr.ConstBytePtr bytes,
                                                     long length)
        Deprecated.
        Description copied from class: NSString
        API-Since: 2.0 Deprecated-Since: 2.0 Deprecated-Message: Use -initWithCString:encoding: instead
        Overrides:
        initWithCStringLength in class NSString
      • initWithCStringNoCopyLengthFreeWhenDone

        @Deprecated
        public NSMutableString initWithCStringNoCopyLengthFreeWhenDone​(@NotNull
                                                                       @NotNull org.moe.natj.general.ptr.BytePtr bytes,
                                                                       long length,
                                                                       boolean freeBuffer)
        Deprecated.
        Description copied from class: NSString
        API-Since: 2.0 Deprecated-Since: 2.0 Deprecated-Message: Use -initWithCString:encoding: instead
        Overrides:
        initWithCStringNoCopyLengthFreeWhenDone in class NSString
      • initWithCapacity

        @NotNull
        public @NotNull NSMutableString initWithCapacity​(long capacity)
        In addition to these two, NSMutableString responds properly to all NSString creation methods.
      • initWithContentsOfFile

        @Deprecated
        public NSMutableString initWithContentsOfFile​(@NotNull
                                                      @NotNull java.lang.String path)
        Deprecated.
        Description copied from class: NSString
        API-Since: 2.0 Deprecated-Since: 2.0 Deprecated-Message: Use -initWithContentsOfFile:encoding:error: instead
        Overrides:
        initWithContentsOfFile in class NSString
      • initWithContentsOfFileUsedEncodingError

        public NSMutableString initWithContentsOfFileUsedEncodingError​(@NotNull
                                                                       @NotNull java.lang.String path,
                                                                       @Nullable
                                                                       @Nullable org.moe.natj.general.ptr.NUIntPtr enc,
                                                                       @Nullable
                                                                       @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        Overrides:
        initWithContentsOfFileUsedEncodingError in class NSString
      • initWithContentsOfURL

        @Deprecated
        public NSMutableString initWithContentsOfURL​(@NotNull
                                                     @NotNull NSURL url)
        Deprecated.
        Description copied from class: NSString
        API-Since: 2.0 Deprecated-Since: 2.0 Deprecated-Message: Use -initWithContentsOfURL:encoding:error: instead
        Overrides:
        initWithContentsOfURL in class NSString
      • initWithContentsOfURLEncodingError

        public NSMutableString initWithContentsOfURLEncodingError​(@NotNull
                                                                  @NotNull NSURL url,
                                                                  long enc,
                                                                  @Nullable
                                                                  @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        Description copied from class: NSString
        These use the specified encoding. If nil is returned, the optional error return indicates problem that was encountered (for instance, file system or encoding errors).
        Overrides:
        initWithContentsOfURLEncodingError in class NSString
      • initWithContentsOfURLUsedEncodingError

        public NSMutableString initWithContentsOfURLUsedEncodingError​(@NotNull
                                                                      @NotNull NSURL url,
                                                                      @Nullable
                                                                      @Nullable org.moe.natj.general.ptr.NUIntPtr enc,
                                                                      @Nullable
                                                                      @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        Description copied from class: NSString
        These try to determine the encoding, and return the encoding which was used. Note that these methods might get "smarter" in subsequent releases of the system, and use additional techniques for recognizing encodings. If nil is returned, the optional error return indicates problem that was encountered (for instance, file system or encoding errors).
        Overrides:
        initWithContentsOfURLUsedEncodingError in class NSString
      • initWithFormatLocale

        public NSMutableString initWithFormatLocale​(@NotNull
                                                    @NotNull java.lang.String format,
                                                    @Nullable
                                                    @Nullable java.lang.Object locale,
                                                    java.lang.Object... varargs)
        Overrides:
        initWithFormatLocale in class NSString
      • initWithFormatLocaleArguments

        public NSMutableString initWithFormatLocaleArguments​(@NotNull
                                                             @NotNull java.lang.String format,
                                                             @Nullable
                                                             @Nullable java.lang.Object locale,
                                                             org.moe.natj.general.ptr.BytePtr argList)
        Overrides:
        initWithFormatLocaleArguments in class NSString
      • insertStringAtIndex

        public void insertStringAtIndex​(@NotNull
                                        @NotNull java.lang.String aString,
                                        long loc)
        Additional mutation methods. For subclassers these are all available implemented in terms of the primitive replaceCharactersInRange:range: method.
      • replaceCharactersInRangeWithString

        public void replaceCharactersInRangeWithString​(NSRange range,
                                                       @NotNull
                                                       @NotNull java.lang.String aString)
        NSMutableString primitive (funnel) method. See below for the other mutation methods.
      • replaceOccurrencesOfStringWithStringOptionsRange

        public long replaceOccurrencesOfStringWithStringOptionsRange​(@NotNull
                                                                     @NotNull java.lang.String target,
                                                                     @NotNull
                                                                     @NotNull java.lang.String replacement,
                                                                     long options,
                                                                     NSRange searchRange)
        This method replaces all occurrences of the target string with the replacement string, in the specified range of the receiver string, and returns the number of replacements. NSBackwardsSearch means the search is done from the end of the range (the results could be different); NSAnchoredSearch means only anchored (but potentially multiple) instances will be replaced. NSLiteralSearch and NSCaseInsensitiveSearch also apply. NSNumericSearch is ignored. Use NSMakeRange(0, [receiver length]) to process whole string. If NSRegularExpressionSearch is specified, the replacement is treated as a template, as in the corresponding NSRegularExpression methods, and no other options can apply except NSCaseInsensitiveSearch and NSAnchoredSearch.
      • setString

        public void setString​(@NotNull
                              @NotNull java.lang.String aString)
      • _supportsSecureCoding

        public boolean _supportsSecureCoding()
        Description copied from interface: NSSecureCoding
        This property must return YES on all classes that allow secure coding. Subclasses of classes that adopt NSSecureCoding and override initWithCoder: must also override this method and return YES. The Secure Coding Guide should be consulted when writing methods that decode data.
        Specified by:
        _supportsSecureCoding in interface NSSecureCoding
        Overrides:
        _supportsSecureCoding in class NSString
      • itemProviderVisibilityForRepresentationWithTypeIdentifier_static

        public static long itemProviderVisibilityForRepresentationWithTypeIdentifier_static​(@NotNull
                                                                                            @NotNull java.lang.String typeIdentifier)
      • objectWithItemProviderDataTypeIdentifierError

        @Nullable
        public static @Nullable NSMutableString objectWithItemProviderDataTypeIdentifierError​(@NotNull
                                                                                              @NotNull NSData data,
                                                                                              @NotNull
                                                                                              @NotNull java.lang.String typeIdentifier,
                                                                                              @Nullable
                                                                                              @Nullable org.moe.natj.general.ptr.Ptr<NSError> outError)
      • readableTypeIdentifiersForItemProvider

        @NotNull
        public static @NotNull NSArray<java.lang.String> readableTypeIdentifiersForItemProvider()
      • writableTypeIdentifiersForItemProvider_static

        @NotNull
        public static @NotNull NSArray<java.lang.String> writableTypeIdentifiersForItemProvider_static()
      • deferredLocalizedIntentsStringWithFormat

        @NotNull
        public static @NotNull java.lang.String deferredLocalizedIntentsStringWithFormat​(@NotNull
                                                                                         @NotNull java.lang.String format,
                                                                                         java.lang.Object... varargs)
      • deferredLocalizedIntentsStringWithFormatFromTable

        @NotNull
        public static @NotNull java.lang.String deferredLocalizedIntentsStringWithFormatFromTable​(@NotNull
                                                                                                  @NotNull java.lang.String format,
                                                                                                  @Nullable
                                                                                                  @Nullable java.lang.String table,
                                                                                                  java.lang.Object... varargs)
      • deferredLocalizedIntentsStringWithFormatFromTableArguments

        @NotNull
        public static @NotNull java.lang.String deferredLocalizedIntentsStringWithFormatFromTableArguments​(@NotNull
                                                                                                           @NotNull java.lang.String format,
                                                                                                           @Nullable
                                                                                                           @Nullable java.lang.String table,
                                                                                                           org.moe.natj.general.ptr.BytePtr arguments)
      • initWithValidatedFormatValidFormatSpecifiersArgumentsError

        public NSMutableString initWithValidatedFormatValidFormatSpecifiersArgumentsError​(@NotNull
                                                                                          @NotNull java.lang.String format,
                                                                                          @NotNull
                                                                                          @NotNull java.lang.String validFormatSpecifiers,
                                                                                          org.moe.natj.general.ptr.BytePtr argList,
                                                                                          @Nullable
                                                                                          @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        Description copied from class: NSString
        API-Since: 16.0
        Overrides:
        initWithValidatedFormatValidFormatSpecifiersArgumentsError in class NSString
      • initWithValidatedFormatValidFormatSpecifiersError

        public NSMutableString initWithValidatedFormatValidFormatSpecifiersError​(@NotNull
                                                                                 @NotNull java.lang.String format,
                                                                                 @NotNull
                                                                                 @NotNull java.lang.String validFormatSpecifiers,
                                                                                 @Nullable
                                                                                 @Nullable org.moe.natj.general.ptr.Ptr<NSError> error,
                                                                                 java.lang.Object... varargs)
        Description copied from class: NSString
        API-Since: 16.0
        Overrides:
        initWithValidatedFormatValidFormatSpecifiersError in class NSString
      • initWithValidatedFormatValidFormatSpecifiersLocaleArgumentsError

        public NSMutableString initWithValidatedFormatValidFormatSpecifiersLocaleArgumentsError​(@NotNull
                                                                                                @NotNull java.lang.String format,
                                                                                                @NotNull
                                                                                                @NotNull java.lang.String validFormatSpecifiers,
                                                                                                @Nullable
                                                                                                @Nullable java.lang.Object locale,
                                                                                                org.moe.natj.general.ptr.BytePtr argList,
                                                                                                @Nullable
                                                                                                @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        Description copied from class: NSString
        API-Since: 11.0
        Overrides:
        initWithValidatedFormatValidFormatSpecifiersLocaleArgumentsError in class NSString
      • initWithValidatedFormatValidFormatSpecifiersLocaleError

        public NSMutableString initWithValidatedFormatValidFormatSpecifiersLocaleError​(@NotNull
                                                                                       @NotNull java.lang.String format,
                                                                                       @NotNull
                                                                                       @NotNull java.lang.String validFormatSpecifiers,
                                                                                       @Nullable
                                                                                       @Nullable java.lang.Object locale,
                                                                                       @Nullable
                                                                                       @Nullable org.moe.natj.general.ptr.Ptr<NSError> error,
                                                                                       java.lang.Object... varargs)
        Description copied from class: NSString
        API-Since: 16.0
        Overrides:
        initWithValidatedFormatValidFormatSpecifiersLocaleError in class NSString
      • localizedStringWithValidatedFormatValidFormatSpecifiersError

        @Nullable
        public static @Nullable NSMutableString localizedStringWithValidatedFormatValidFormatSpecifiersError​(@NotNull
                                                                                                             @NotNull java.lang.String format,
                                                                                                             @NotNull
                                                                                                             @NotNull java.lang.String validFormatSpecifiers,
                                                                                                             @Nullable
                                                                                                             @Nullable org.moe.natj.general.ptr.Ptr<NSError> error,
                                                                                                             java.lang.Object... varargs)
      • stringWithValidatedFormatValidFormatSpecifiersError

        public static NSMutableString stringWithValidatedFormatValidFormatSpecifiersError​(@NotNull
                                                                                          @NotNull java.lang.String format,
                                                                                          @NotNull
                                                                                          @NotNull java.lang.String validFormatSpecifiers,
                                                                                          @Nullable
                                                                                          @Nullable org.moe.natj.general.ptr.Ptr<NSError> error,
                                                                                          java.lang.Object... varargs)
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.