Class NSString

    • Constructor Detail

      • NSString

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

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • alloc

        public static NSString alloc()
      • allocWithZone

        public static NSString 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()
        Should be rarely used
      • 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 NSString 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)
        Use -[NSString localizedUserNotificationStringForKey:arguments:] to provide a string that will be localized at the time that the notification is presented. API-Since: 10.0
      • new_objc

        public static NSString new_objc()
      • 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)
      • string

        public static NSString string()
      • 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)
        This API is used to detect the string encoding of a given raw data. It can also do lossy string conversion. It converts the data to a string in the detected string encoding. The data object contains the raw bytes, and the option dictionary contains the hints and parameters for the analysis. The opts dictionary can be nil. If the string parameter is not NULL, the string created by the detected string encoding is returned. The lossy substitution string is emitted in the output string for characters that could not be converted when lossy conversion is enabled. The usedLossyConversion indicates if there is any lossy conversion in the resulted string. If no encoding can be detected, 0 is returned. The possible items for the dictionary are: 1) an array of suggested string encodings (without specifying the 3rd option in this list, all string encodings are considered but the ones in the array will have a higher preference; moreover, the order of the encodings in the array is important: the first encoding has a higher preference than the second one in the array) 2) an array of string encodings not to use (the string encodings in this list will not be considered at all) 3) a boolean option indicating whether only the suggested string encodings are considered 4) a boolean option indicating whether lossy is allowed 5) an option that gives a specific string to substitude for mystery bytes 6) the current user's language 7) a boolean option indicating whether the data is generated by Windows If the values in the dictionary have wrong types (for example, the value of NSStringEncodingDetectionSuggestedEncodingsKey is not an array), an exception is thrown. If the values in the dictionary are unknown (for example, the value in the array of suggested string encodings is not a valid encoding), the values will be ignored. API-Since: 8.0
      • stringWithCString

        @Deprecated
        public static NSString stringWithCString​(@NotNull
                                                 @NotNull org.moe.natj.general.ptr.ConstBytePtr bytes)
        Deprecated.
        API-Since: 2.0 Deprecated-Since: 2.0 Deprecated-Message: Use +stringWithCString:encoding: instead
      • stringWithCStringEncoding

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

        @Deprecated
        public static NSString stringWithCStringLength​(@NotNull
                                                       @NotNull org.moe.natj.general.ptr.ConstBytePtr bytes,
                                                       long length)
        Deprecated.
        API-Since: 2.0 Deprecated-Since: 2.0 Deprecated-Message: Use +stringWithCString:encoding:
      • stringWithCharactersLength

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

        @Deprecated
        public static NSString stringWithContentsOfFile​(@NotNull
                                                        @NotNull java.lang.String path)
        Deprecated.
        API-Since: 2.0 Deprecated-Since: 2.0 Deprecated-Message: Use +stringWithContentsOfFile:encoding:error: instead
      • stringWithContentsOfFileEncodingError

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

        public static NSString 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 NSString stringWithContentsOfURL​(@NotNull
                                                       @NotNull NSURL url)
        Deprecated.
        API-Since: 2.0 Deprecated-Since: 2.0 Deprecated-Message: Use +stringWithContentsOfURL:encoding:error: instead
      • stringWithContentsOfURLEncodingError

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

        public static NSString 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 NSString stringWithFormat​(@NotNull
                                                @NotNull java.lang.String format,
                                                java.lang.Object... varargs)
      • stringWithString

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

        public static NSString 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()
      • UTF8String

        @Nullable
        public @Nullable org.moe.natj.general.ptr.ConstBytePtr UTF8String()
        Convenience to return null-terminated UTF8 representation
      • boolValue

        public boolean boolValue()
        Skips initial space characters (whitespaceSet), or optional -/+ sign followed by zeroes. Returns YES on encountering one of "Y", "y", "T", "t", or a digit 1-9. It ignores any trailing characters. API-Since: 2.0
      • boundingRectWithSizeOptionsAttributesContext

        public CGRect boundingRectWithSizeOptionsAttributesContext​(CGSize size,
                                                                   long options,
                                                                   @Nullable
                                                                   @Nullable NSDictionary<java.lang.String,​?> attributes,
                                                                   @Nullable
                                                                   @Nullable NSStringDrawingContext context)
        API-Since: 7.0
      • cString

        @Nullable
        @Deprecated
        public @Nullable org.moe.natj.general.ptr.ConstBytePtr cString()
        Deprecated.
        The following methods are deprecated and will be removed from this header file in the near future. These methods use NSString.defaultCStringEncoding as the encoding to convert to, which means the results depend on the user's language and potentially other settings. This might be appropriate in some cases, but often these methods are misused, resulting in issues when running in languages other then English. UTF8String in general is a much better choice when converting arbitrary NSStrings into 8-bit representations. Additional potential replacement methods are being introduced in NSString as appropriate. API-Since: 2.0 Deprecated-Since: 2.0 Deprecated-Message: Use -cStringUsingEncoding: instead
      • cStringLength

        @Deprecated
        public long cStringLength()
        Deprecated.
        API-Since: 2.0 Deprecated-Since: 2.0 Deprecated-Message: Use -lengthOfBytesUsingEncoding: instead
      • cStringUsingEncoding

        @Nullable
        public @Nullable org.moe.natj.general.ptr.ConstBytePtr cStringUsingEncoding​(long encoding)
        "Autoreleased"; NULL return if encoding conversion not possible; for performance reasons, lifetime of this should not be considered longer than the lifetime of the receiving string (if the receiver string is freed, this might go invalid then, before the end of the autorelease scope). Use only with 8-bit encodings, and not encodings such as UTF-16 or UTF-32.
      • canBeConvertedToEncoding

        public boolean canBeConvertedToEncoding​(long encoding)
      • capitalizedString

        @NotNull
        public @NotNull java.lang.String capitalizedString()
      • capitalizedStringWithLocale

        @NotNull
        public @NotNull java.lang.String capitalizedStringWithLocale​(@Nullable
                                                                     @Nullable NSLocale locale)
        API-Since: 6.0
      • caseInsensitiveCompare

        public long caseInsensitiveCompare​(@NotNull
                                           @NotNull java.lang.String string)
      • characterAtIndex

        public char characterAtIndex​(long index)
      • commonPrefixWithStringOptions

        @NotNull
        public @NotNull java.lang.String commonPrefixWithStringOptions​(@NotNull
                                                                       @NotNull java.lang.String str,
                                                                       long mask)
      • compare

        public long compare​(@NotNull
                            @NotNull java.lang.String string)
        In the compare: methods, the range argument specifies the subrange, rather than the whole, of the receiver to use in the comparison. The range is not applied to the search string. For example, [@"AB" compare:@"ABC" options:0 range:NSMakeRange(0,1)] compares "A" to "ABC", not "A" to "A", and will return NSOrderedAscending. It is an error to specify a range that is outside of the receiver's bounds, and an exception may be raised.
      • compareOptions

        public long compareOptions​(@NotNull
                                   @NotNull java.lang.String string,
                                   long mask)
      • compareOptionsRange

        public long compareOptionsRange​(@NotNull
                                        @NotNull java.lang.String string,
                                        long mask,
                                        NSRange rangeOfReceiverToCompare)
      • compareOptionsRangeLocale

        public long compareOptionsRangeLocale​(@NotNull
                                              @NotNull java.lang.String string,
                                              long mask,
                                              NSRange rangeOfReceiverToCompare,
                                              @Nullable
                                              @Nullable java.lang.Object locale)
        locale arg used to be a dictionary pre-Leopard. We now accept NSLocale. Assumes the current locale if non-nil and non-NSLocale. nil continues to mean canonical compare, which doesn't depend on user's locale choice.
      • completePathIntoStringCaseSensitiveMatchesIntoArrayFilterTypes

        public long completePathIntoStringCaseSensitiveMatchesIntoArrayFilterTypes​(@Nullable
                                                                                   @Nullable org.moe.natj.general.ptr.Ptr<NSString> outputName,
                                                                                   boolean flag,
                                                                                   @Nullable
                                                                                   @Nullable org.moe.natj.general.ptr.Ptr<NSArray<java.lang.String>> outputArray,
                                                                                   @Nullable
                                                                                   @Nullable NSArray<java.lang.String> filterTypes)
      • componentsSeparatedByCharactersInSet

        @NotNull
        public @NotNull NSArray<java.lang.String> componentsSeparatedByCharactersInSet​(@NotNull
                                                                                       @NotNull NSCharacterSet separator)
        API-Since: 2.0
      • componentsSeparatedByString

        @NotNull
        public @NotNull NSArray<java.lang.String> componentsSeparatedByString​(@NotNull
                                                                              @NotNull java.lang.String separator)
      • containsString

        public boolean containsString​(@NotNull
                                      @NotNull java.lang.String str)
        Simple convenience methods for string searching. containsString: returns YES if the target string is contained within the receiver. Same as calling rangeOfString:options: with no options, thus doing a case-sensitive, locale-unaware search. localizedCaseInsensitiveContainsString: is the case-insensitive variant which also takes the current locale into effect. Starting in 10.11 and iOS9, the new localizedStandardRangeOfString: or localizedStandardContainsString: APIs are even better convenience methods for user level searching. More sophisticated needs can be achieved by calling rangeOfString:options:range:locale: directly. API-Since: 8.0
      • copyWithZone

        @NotNull
        public @NotNull java.lang.Object copyWithZone​(@Nullable
                                                      @Nullable org.moe.natj.general.ptr.VoidPtr zone)
        Specified by:
        copyWithZone in interface NSCopying
      • dataUsingEncoding

        @Nullable
        public @Nullable NSData dataUsingEncoding​(long encoding)
        External representation
      • dataUsingEncodingAllowLossyConversion

        @Nullable
        public @Nullable NSData dataUsingEncodingAllowLossyConversion​(long encoding,
                                                                      boolean lossy)
        External representation
      • decomposedStringWithCanonicalMapping

        @NotNull
        public @NotNull java.lang.String decomposedStringWithCanonicalMapping()
      • decomposedStringWithCompatibilityMapping

        @NotNull
        public @NotNull java.lang.String decomposedStringWithCompatibilityMapping()
      • doubleValue

        public double doubleValue()
        The following convenience methods all skip initial space characters (whitespaceSet) and ignore trailing characters. They are not locale-aware. NSScanner or NSNumberFormatter can be used for more powerful and locale-aware parsing of numbers.
      • drawAtPointForWidthWithFontFontSizeLineBreakModeBaselineAdjustment

        @Deprecated
        public CGSize drawAtPointForWidthWithFontFontSizeLineBreakModeBaselineAdjustment​(CGPoint point,
                                                                                         double width,
                                                                                         UIFont font,
                                                                                         double fontSize,
                                                                                         long lineBreakMode,
                                                                                         long baselineAdjustment)
        Deprecated.
        API-Since: 2.0 Deprecated-Since: 7.0
      • drawAtPointForWidthWithFontLineBreakMode

        @Deprecated
        public CGSize drawAtPointForWidthWithFontLineBreakMode​(CGPoint point,
                                                               double width,
                                                               UIFont font,
                                                               long lineBreakMode)
        Deprecated.
        API-Since: 2.0 Deprecated-Since: 7.0
      • drawAtPointForWidthWithFontMinFontSizeActualFontSizeLineBreakModeBaselineAdjustment

        @Deprecated
        public CGSize drawAtPointForWidthWithFontMinFontSizeActualFontSizeLineBreakModeBaselineAdjustment​(CGPoint point,
                                                                                                          double width,
                                                                                                          UIFont font,
                                                                                                          double minFontSize,
                                                                                                          org.moe.natj.general.ptr.NFloatPtr actualFontSize,
                                                                                                          long lineBreakMode,
                                                                                                          long baselineAdjustment)
        Deprecated.
        API-Since: 2.0 Deprecated-Since: 7.0
      • drawAtPointWithAttributes

        public void drawAtPointWithAttributes​(CGPoint point,
                                              @Nullable
                                              @Nullable NSDictionary<java.lang.String,​?> attrs)
        API-Since: 7.0
      • drawAtPointWithFont

        @Deprecated
        public CGSize drawAtPointWithFont​(CGPoint point,
                                          UIFont font)
        Deprecated.
        Single line, no wrapping. Truncation based on the NSLineBreakMode. API-Since: 2.0 Deprecated-Since: 7.0
      • drawInRectWithAttributes

        public void drawInRectWithAttributes​(CGRect rect,
                                             @Nullable
                                             @Nullable NSDictionary<java.lang.String,​?> attrs)
        API-Since: 7.0
      • drawInRectWithFont

        @Deprecated
        public CGSize drawInRectWithFont​(CGRect rect,
                                         UIFont font)
        Deprecated.
        Wrapping to fit horizontal and vertical size. API-Since: 2.0 Deprecated-Since: 7.0
      • drawInRectWithFontLineBreakMode

        @Deprecated
        public CGSize drawInRectWithFontLineBreakMode​(CGRect rect,
                                                      UIFont font,
                                                      long lineBreakMode)
        Deprecated.
        API-Since: 2.0 Deprecated-Since: 7.0
      • drawInRectWithFontLineBreakModeAlignment

        @Deprecated
        public CGSize drawInRectWithFontLineBreakModeAlignment​(CGRect rect,
                                                               UIFont font,
                                                               long lineBreakMode,
                                                               long alignment)
        Deprecated.
        API-Since: 2.0 Deprecated-Since: 7.0
      • drawWithRectOptionsAttributesContext

        public void drawWithRectOptionsAttributesContext​(CGRect rect,
                                                         long options,
                                                         @Nullable
                                                         @Nullable NSDictionary<java.lang.String,​?> attributes,
                                                         @Nullable
                                                         @Nullable NSStringDrawingContext context)
        API-Since: 7.0
      • enumerateLinguisticTagsInRangeSchemeOptionsOrthographyUsingBlock

        @Deprecated
        public void enumerateLinguisticTagsInRangeSchemeOptionsOrthographyUsingBlock​(NSRange range,
                                                                                     @NotNull
                                                                                     @NotNull java.lang.String scheme,
                                                                                     long options,
                                                                                     @Nullable
                                                                                     @Nullable NSOrthography orthography,
                                                                                     @NotNull
                                                                                     @NotNull NSString.Block_enumerateLinguisticTagsInRangeSchemeOptionsOrthographyUsingBlock block)
        Deprecated.
        API-Since: 5.0 Deprecated-Since: 100000.0 Deprecated-Message: All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API
      • enumerateSubstringsInRangeOptionsUsingBlock

        public void enumerateSubstringsInRangeOptionsUsingBlock​(NSRange range,
                                                                long opts,
                                                                @NotNull
                                                                @NotNull NSString.Block_enumerateSubstringsInRangeOptionsUsingBlock block)
        In the enumerate methods, the blocks will be invoked inside an autorelease pool, so any values assigned inside the block should be retained. API-Since: 4.0
      • fastestEncoding

        public long fastestEncoding()
        Result in O(1) time; a rough estimate
      • fileSystemRepresentation

        @NotNull
        public @NotNull java.lang.String fileSystemRepresentation()
      • floatValue

        public float floatValue()
      • getBytesMaxLengthUsedLengthEncodingOptionsRangeRemainingRange

        public boolean getBytesMaxLengthUsedLengthEncodingOptionsRangeRemainingRange​(@Nullable
                                                                                     @Nullable org.moe.natj.general.ptr.VoidPtr buffer,
                                                                                     long maxBufferCount,
                                                                                     @Nullable
                                                                                     @Nullable org.moe.natj.general.ptr.NUIntPtr usedBufferCount,
                                                                                     long encoding,
                                                                                     long options,
                                                                                     NSRange range,
                                                                                     @Nullable
                                                                                     @Nullable NSRange leftover)
        Use this to convert string section at a time into a fixed-size buffer, without any allocations. Does not NULL-terminate. buffer is the buffer to write to; if NULL, this method can be used to computed size of needed buffer. maxBufferCount is the length of the buffer in bytes. It's a good idea to make sure this is at least enough to hold one character's worth of conversion. usedBufferCount is the length of the buffer used up by the current conversion. Can be NULL. encoding is the encoding to convert to. options specifies the options to apply. range is the range to convert. leftOver is the remaining range. Can be NULL. YES return indicates some characters were converted. Conversion might usually stop when the buffer fills, but it might also stop when the conversion isn't possible due to the chosen encoding.
      • getCString

        @Deprecated
        public void getCString​(@NotNull
                               @NotNull org.moe.natj.general.ptr.BytePtr bytes)
        Deprecated.
        API-Since: 2.0 Deprecated-Since: 2.0 Deprecated-Message: Use -getCString:maxLength:encoding: instead
      • getCStringMaxLength

        @Deprecated
        public void getCStringMaxLength​(@NotNull
                                        @NotNull org.moe.natj.general.ptr.BytePtr bytes,
                                        long maxLength)
        Deprecated.
        API-Since: 2.0 Deprecated-Since: 2.0 Deprecated-Message: Use -getCString:maxLength:encoding: instead
      • getCStringMaxLengthEncoding

        public boolean getCStringMaxLengthEncoding​(@NotNull
                                                   @NotNull org.moe.natj.general.ptr.BytePtr buffer,
                                                   long maxBufferCount,
                                                   long encoding)
        NO return if conversion not possible due to encoding errors or too small of a buffer. The buffer should include room for maxBufferCount bytes; this number should accomodate the expected size of the return value plus the NULL termination character, which this method adds. (So note that the maxLength passed to this method is one more than the one you would have passed to the deprecated getCString:maxLength:.) Use only with 8-bit encodings, and not encodings such as UTF-16 or UTF-32.
      • getCStringMaxLengthRangeRemainingRange

        @Deprecated
        public void getCStringMaxLengthRangeRemainingRange​(@NotNull
                                                           @NotNull org.moe.natj.general.ptr.BytePtr bytes,
                                                           long maxLength,
                                                           NSRange aRange,
                                                           @Nullable
                                                           @Nullable NSRange leftoverRange)
        Deprecated.
        API-Since: 2.0 Deprecated-Since: 2.0 Deprecated-Message: Use -getCString:maxLength:encoding: instead
      • getCharacters

        public void getCharacters​(@NotNull
                                  @NotNull org.moe.natj.general.ptr.CharPtr buffer)
        This method is unsafe because it could potentially cause buffer overruns. You should use -getCharacters:range: instead.
      • getCharactersRange

        public void getCharactersRange​(@NotNull
                                       @NotNull org.moe.natj.general.ptr.CharPtr buffer,
                                       NSRange range)
        Use with rangeOfComposedCharacterSequencesForRange: to avoid breaking up character sequences
      • getFileSystemRepresentationMaxLength

        public boolean getFileSystemRepresentationMaxLength​(@NotNull
                                                            @NotNull org.moe.natj.general.ptr.BytePtr cname,
                                                            long max)
      • getLineStartEndContentsEndForRange

        public void getLineStartEndContentsEndForRange​(@Nullable
                                                       @Nullable org.moe.natj.general.ptr.NUIntPtr startPtr,
                                                       @Nullable
                                                       @Nullable org.moe.natj.general.ptr.NUIntPtr lineEndPtr,
                                                       @Nullable
                                                       @Nullable org.moe.natj.general.ptr.NUIntPtr contentsEndPtr,
                                                       NSRange range)
      • getParagraphStartEndContentsEndForRange

        public void getParagraphStartEndContentsEndForRange​(@Nullable
                                                            @Nullable org.moe.natj.general.ptr.NUIntPtr startPtr,
                                                            @Nullable
                                                            @Nullable org.moe.natj.general.ptr.NUIntPtr parEndPtr,
                                                            @Nullable
                                                            @Nullable org.moe.natj.general.ptr.NUIntPtr contentsEndPtr,
                                                            NSRange range)
      • hasPrefix

        public boolean hasPrefix​(@NotNull
                                 @NotNull java.lang.String str)
        These perform locale unaware prefix or suffix match. If you need locale awareness, use rangeOfString:options:range:locale:, passing NSAnchoredSearch (or'ed with NSBackwardsSearch for suffix, and NSCaseInsensitiveSearch|NSDiacriticInsensitiveSearch if needed) for options, NSMakeRange(0, [receiver length]) for range, and [NSLocale currentLocale] for locale.
      • hasSuffix

        public boolean hasSuffix​(@NotNull
                                 @NotNull java.lang.String str)
      • init

        public NSString init()
        The initializers available to subclasses. See further below for additional init methods.
        Overrides:
        init in class NSObject
      • initWithBytesLengthEncoding

        public NSString initWithBytesLengthEncoding​(@NotNull
                                                    @NotNull org.moe.natj.general.ptr.ConstVoidPtr bytes,
                                                    long len,
                                                    long encoding)
      • initWithBytesNoCopyLengthEncodingFreeWhenDone

        public NSString initWithBytesNoCopyLengthEncodingFreeWhenDone​(@NotNull
                                                                      @NotNull org.moe.natj.general.ptr.VoidPtr bytes,
                                                                      long len,
                                                                      long encoding,
                                                                      boolean freeBuffer)
        "NoCopy" is a hint
      • initWithCString

        @Deprecated
        public NSString initWithCString​(@NotNull
                                        @NotNull org.moe.natj.general.ptr.ConstBytePtr bytes)
        Deprecated.
        API-Since: 2.0 Deprecated-Since: 2.0 Deprecated-Message: Use -initWithCString:encoding: instead
      • initWithCStringEncoding

        public NSString initWithCStringEncoding​(@NotNull
                                                @NotNull org.moe.natj.general.ptr.ConstBytePtr nullTerminatedCString,
                                                long encoding)
      • initWithCStringLength

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

        @Deprecated
        public NSString initWithCStringNoCopyLengthFreeWhenDone​(@NotNull
                                                                @NotNull org.moe.natj.general.ptr.BytePtr bytes,
                                                                long length,
                                                                boolean freeBuffer)
        Deprecated.
        API-Since: 2.0 Deprecated-Since: 2.0 Deprecated-Message: Use -initWithCString:encoding: instead
      • initWithCharactersLength

        public NSString initWithCharactersLength​(@NotNull
                                                 @NotNull org.moe.natj.general.ptr.ConstCharPtr characters,
                                                 long length)
      • initWithCharactersNoCopyLengthFreeWhenDone

        public NSString initWithCharactersNoCopyLengthFreeWhenDone​(@NotNull
                                                                   @NotNull org.moe.natj.general.ptr.CharPtr characters,
                                                                   long length,
                                                                   boolean freeBuffer)
        "NoCopy" is a hint
      • initWithContentsOfFile

        @Deprecated
        public NSString initWithContentsOfFile​(@NotNull
                                               @NotNull java.lang.String path)
        Deprecated.
        API-Since: 2.0 Deprecated-Since: 2.0 Deprecated-Message: Use -initWithContentsOfFile:encoding:error: instead
      • initWithContentsOfFileEncodingError

        public NSString initWithContentsOfFileEncodingError​(@NotNull
                                                            @NotNull java.lang.String path,
                                                            long enc,
                                                            @Nullable
                                                            @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
      • initWithContentsOfFileUsedEncodingError

        public NSString 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)
      • initWithContentsOfURL

        @Deprecated
        public NSString initWithContentsOfURL​(@NotNull
                                              @NotNull NSURL url)
        Deprecated.
        API-Since: 2.0 Deprecated-Since: 2.0 Deprecated-Message: Use -initWithContentsOfURL:encoding:error: instead
      • initWithContentsOfURLEncodingError

        public NSString initWithContentsOfURLEncodingError​(@NotNull
                                                           @NotNull NSURL url,
                                                           long enc,
                                                           @Nullable
                                                           @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        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).
      • initWithContentsOfURLUsedEncodingError

        public NSString initWithContentsOfURLUsedEncodingError​(@NotNull
                                                               @NotNull NSURL url,
                                                               @Nullable
                                                               @Nullable org.moe.natj.general.ptr.NUIntPtr enc,
                                                               @Nullable
                                                               @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        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).
      • initWithDataEncoding

        public NSString initWithDataEncoding​(@NotNull
                                             @NotNull NSData data,
                                             long encoding)
      • initWithFormat

        public NSString initWithFormat​(@NotNull
                                       @NotNull java.lang.String format,
                                       java.lang.Object... varargs)
      • initWithFormatArguments

        public NSString initWithFormatArguments​(@NotNull
                                                @NotNull java.lang.String format,
                                                org.moe.natj.general.ptr.BytePtr argList)
      • initWithFormatLocale

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

        public NSString initWithFormatLocaleArguments​(@NotNull
                                                      @NotNull java.lang.String format,
                                                      @Nullable
                                                      @Nullable java.lang.Object locale,
                                                      org.moe.natj.general.ptr.BytePtr argList)
      • initWithString

        public NSString initWithString​(@NotNull
                                       @NotNull java.lang.String aString)
      • initWithUTF8String

        public NSString initWithUTF8String​(@NotNull
                                           @NotNull org.moe.natj.general.ptr.ConstBytePtr nullTerminatedCString)
      • intValue

        public int intValue()
      • integerValue

        public long integerValue()
        API-Since: 2.0
      • isAbsolutePath

        public boolean isAbsolutePath()
      • isEqualToString

        public boolean isEqualToString​(@NotNull
                                       @NotNull java.lang.String aString)
      • lastPathComponent

        @NotNull
        public @NotNull java.lang.String lastPathComponent()
      • length

        public long length()
        NSString primitives. A minimal subclass of NSString just needs to implement these two, along with an init method appropriate for that subclass. We also recommend overriding getCharacters:range: for performance.
      • lengthOfBytesUsingEncoding

        public long lengthOfBytesUsingEncoding​(long enc)
        Result in O(n) time; the result is exact. Returns 0 on error (cannot convert to specified encoding, or overflow)
      • lineRangeForRange

        public NSRange lineRangeForRange​(NSRange range)
      • linguisticTagsInRangeSchemeOptionsOrthographyTokenRanges

        @NotNull
        @Deprecated
        public @NotNull NSArray<java.lang.String> linguisticTagsInRangeSchemeOptionsOrthographyTokenRanges​(NSRange range,
                                                                                                           @NotNull
                                                                                                           @NotNull java.lang.String scheme,
                                                                                                           long options,
                                                                                                           @Nullable
                                                                                                           @Nullable NSOrthography orthography,
                                                                                                           @Nullable
                                                                                                           @Nullable org.moe.natj.general.ptr.Ptr<NSArray<? extends NSValue>> tokenRanges)
        Deprecated.
        Clients wishing to analyze a given string once may use these NSString APIs without having to create an instance of NSLinguisticTagger. If more than one tagging operation is needed on a given string, it is more efficient to use an explicit NSLinguisticTagger instance. API-Since: 5.0 Deprecated-Since: 100000.0 Deprecated-Message: All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API
      • localizedCapitalizedString

        @NotNull
        public @NotNull java.lang.String localizedCapitalizedString()
        API-Since: 9.0
      • localizedCaseInsensitiveCompare

        public long localizedCaseInsensitiveCompare​(@NotNull
                                                    @NotNull java.lang.String string)
      • localizedCaseInsensitiveContainsString

        public boolean localizedCaseInsensitiveContainsString​(@NotNull
                                                              @NotNull java.lang.String str)
        API-Since: 8.0
      • localizedCompare

        public long localizedCompare​(@NotNull
                                     @NotNull java.lang.String string)
      • localizedLowercaseString

        @NotNull
        public @NotNull java.lang.String localizedLowercaseString()
        API-Since: 9.0
      • localizedStandardCompare

        public long localizedStandardCompare​(@NotNull
                                             @NotNull java.lang.String string)
        localizedStandardCompare:, added in 10.6, should be used whenever file names or other strings are presented in lists and tables where Finder-like sorting is appropriate. The exact behavior of this method may be tweaked in future releases, and will be different under different localizations, so clients should not depend on the exact sorting order of the strings. API-Since: 4.0
      • localizedStandardContainsString

        public boolean localizedStandardContainsString​(@NotNull
                                                       @NotNull java.lang.String str)
        The following two are the most appropriate methods for doing user-level string searches, similar to how searches are done generally in the system. The search is locale-aware, case and diacritic insensitive. As with other APIs, "standard" in the name implies "system default behavior," so the exact list of search options applied may change over time. If you need more control over the search options, please use the rangeOfString:options:range:locale: method. You can pass [NSLocale currentLocale] for searches in user's locale. API-Since: 9.0
      • localizedStandardRangeOfString

        public NSRange localizedStandardRangeOfString​(@NotNull
                                                      @NotNull java.lang.String str)
        API-Since: 9.0
      • localizedUppercaseString

        @NotNull
        public @NotNull java.lang.String localizedUppercaseString()
        The following three return the locale-aware case mappings. They are suitable for strings presented to the user. API-Since: 9.0
      • longLongValue

        public long longLongValue()
        API-Since: 2.0
      • lossyCString

        @Nullable
        @Deprecated
        public @Nullable org.moe.natj.general.ptr.ConstBytePtr lossyCString()
        Deprecated.
        API-Since: 2.0 Deprecated-Since: 2.0 Deprecated-Message: Use -cStringUsingEncoding: instead
      • lowercaseString

        @NotNull
        public @NotNull java.lang.String lowercaseString()
      • lowercaseStringWithLocale

        @NotNull
        public @NotNull java.lang.String lowercaseStringWithLocale​(@Nullable
                                                                   @Nullable NSLocale locale)
        API-Since: 6.0
      • maximumLengthOfBytesUsingEncoding

        public long maximumLengthOfBytesUsingEncoding​(long enc)
        Result in O(1) time; the estimate may be way over what's needed. Returns 0 on error (overflow)
      • mutableCopyWithZone

        @NotNull
        public @NotNull java.lang.Object mutableCopyWithZone​(@Nullable
                                                             @Nullable org.moe.natj.general.ptr.VoidPtr zone)
        Specified by:
        mutableCopyWithZone in interface NSMutableCopying
      • paragraphRangeForRange

        public NSRange paragraphRangeForRange​(NSRange range)
      • pathComponents

        @NotNull
        public @NotNull NSArray<java.lang.String> pathComponents()
      • pathExtension

        @NotNull
        public @NotNull java.lang.String pathExtension()
      • precomposedStringWithCanonicalMapping

        @NotNull
        public @NotNull java.lang.String precomposedStringWithCanonicalMapping()
      • precomposedStringWithCompatibilityMapping

        @NotNull
        public @NotNull java.lang.String precomposedStringWithCompatibilityMapping()
      • propertyList

        @NotNull
        public @NotNull java.lang.Object propertyList()
        These methods are no longer recommended since they do not work with property lists and strings files in binary plist format. Please use the APIs in NSPropertyList.h instead.
      • propertyListFromStringsFileFormat

        @Nullable
        public @Nullable NSDictionary<?,​?> propertyListFromStringsFileFormat()
      • rangeOfCharacterFromSet

        public NSRange rangeOfCharacterFromSet​(@NotNull
                                               @NotNull NSCharacterSet searchSet)
        These return the range of the first character from the set in the string, not the range of a sequence of characters. The range argument specifies the subrange, rather than the whole, of the receiver to use in the search. It is an error to specify a range that is outside of the receiver's bounds, and an exception may be raised.
      • rangeOfCharacterFromSetOptions

        public NSRange rangeOfCharacterFromSetOptions​(@NotNull
                                                      @NotNull NSCharacterSet searchSet,
                                                      long mask)
      • rangeOfCharacterFromSetOptionsRange

        public NSRange rangeOfCharacterFromSetOptionsRange​(@NotNull
                                                           @NotNull NSCharacterSet searchSet,
                                                           long mask,
                                                           NSRange rangeOfReceiverToSearch)
      • rangeOfComposedCharacterSequenceAtIndex

        public NSRange rangeOfComposedCharacterSequenceAtIndex​(long index)
      • rangeOfComposedCharacterSequencesForRange

        public NSRange rangeOfComposedCharacterSequencesForRange​(NSRange range)
        API-Since: 2.0
      • rangeOfString

        public NSRange rangeOfString​(@NotNull
                                     @NotNull java.lang.String searchString)
        These methods perform string search, looking for the searchString within the receiver string. These return length==0 if the target string is not found. So, to check for containment: ([str rangeOfString:@"target"].length > 0). Note that the length of the range returned by these methods might be different than the length of the target string, due composed characters and such. Note that the first three methods do not take locale arguments, and perform the search in a non-locale aware fashion, which is not appropriate for user-level searching. To do user-level string searching, use the last method, specifying locale:[NSLocale currentLocale], or better yet, use localizedStandardRangeOfString: or localizedStandardContainsString:. The range argument specifies the subrange, rather than the whole, of the receiver to use in the search. It is an error to specify a range that is outside of the receiver's bounds, and an exception may be raised.
      • rangeOfStringOptions

        public NSRange rangeOfStringOptions​(@NotNull
                                            @NotNull java.lang.String searchString,
                                            long mask)
      • rangeOfStringOptionsRange

        public NSRange rangeOfStringOptionsRange​(@NotNull
                                                 @NotNull java.lang.String searchString,
                                                 long mask,
                                                 NSRange rangeOfReceiverToSearch)
      • rangeOfStringOptionsRangeLocale

        public NSRange rangeOfStringOptionsRangeLocale​(@NotNull
                                                       @NotNull java.lang.String searchString,
                                                       long mask,
                                                       NSRange rangeOfReceiverToSearch,
                                                       @Nullable
                                                       @Nullable NSLocale locale)
        API-Since: 2.0
      • sizeWithAttributes

        public CGSize sizeWithAttributes​(@Nullable
                                         @Nullable NSDictionary<java.lang.String,​?> attrs)
        API-Since: 7.0
      • sizeWithFont

        @Deprecated
        public CGSize sizeWithFont​(UIFont font)
        Deprecated.
        Single line, no wrapping. Truncation based on the NSLineBreakMode. API-Since: 2.0 Deprecated-Since: 7.0
      • sizeWithFontConstrainedToSize

        @Deprecated
        public CGSize sizeWithFontConstrainedToSize​(UIFont font,
                                                    CGSize size)
        Deprecated.
        Uses NSLineBreakModeWordWrap API-Since: 2.0 Deprecated-Since: 7.0
      • sizeWithFontConstrainedToSizeLineBreakMode

        @Deprecated
        public CGSize sizeWithFontConstrainedToSizeLineBreakMode​(UIFont font,
                                                                 CGSize size,
                                                                 long lineBreakMode)
        Deprecated.
        NSTextAlignment is not needed to determine size API-Since: 2.0 Deprecated-Since: 7.0
      • sizeWithFontForWidthLineBreakMode

        @Deprecated
        public CGSize sizeWithFontForWidthLineBreakMode​(UIFont font,
                                                        double width,
                                                        long lineBreakMode)
        Deprecated.
        API-Since: 2.0 Deprecated-Since: 7.0
      • sizeWithFontMinFontSizeActualFontSizeForWidthLineBreakMode

        @Deprecated
        public CGSize sizeWithFontMinFontSizeActualFontSizeForWidthLineBreakMode​(UIFont font,
                                                                                 double minFontSize,
                                                                                 org.moe.natj.general.ptr.NFloatPtr actualFontSize,
                                                                                 double width,
                                                                                 long lineBreakMode)
        Deprecated.
        These methods will behave identically to the above single line methods if the string will fit in the specified width in the specified font. If not, the font size will be reduced until either the string fits or the minimum font size is reached. If the minimum font size is reached and the string still won't fit, the string will be truncated and drawn at the minimum font size. The first two methods are used together, and the actualFontSize returned in the sizeWithFont method should be passed to the drawAtPoint method. The last method will do the sizing calculation and drawing in one operation. API-Since: 2.0 Deprecated-Since: 7.0
      • smallestEncoding

        public long smallestEncoding()
        Result in O(n) time; the encoding in which the string is most compact
      • stringByAbbreviatingWithTildeInPath

        @NotNull
        public @NotNull java.lang.String stringByAbbreviatingWithTildeInPath()
      • stringByAddingPercentEncodingWithAllowedCharacters

        @Nullable
        public @Nullable java.lang.String stringByAddingPercentEncodingWithAllowedCharacters​(@NotNull
                                                                                             @NotNull NSCharacterSet allowedCharacters)
        Returns a new string made from the receiver by replacing all characters not in the allowedCharacters set with percent encoded characters. UTF-8 encoding is used to determine the correct percent encoded characters. Entire URL strings cannot be percent-encoded. This method is intended to percent-encode a URL component or subcomponent string, NOT the entire URL string. Any characters in allowedCharacters outside of the 7-bit ASCII range are ignored. API-Since: 7.0
      • stringByAddingPercentEscapesUsingEncoding

        @Nullable
        @Deprecated
        public @Nullable java.lang.String stringByAddingPercentEscapesUsingEncoding​(long enc)
        Deprecated.
        API-Since: 2.0 Deprecated-Since: 9.0 Deprecated-Message: Use -stringByAddingPercentEncodingWithAllowedCharacters: instead, which always uses the recommended UTF-8 encoding, and which encodes for a specific URL component or subcomponent since each URL component or subcomponent has different rules for what characters are valid.
      • stringByAppendingFormat

        @NotNull
        public @NotNull java.lang.String stringByAppendingFormat​(@NotNull
                                                                 @NotNull java.lang.String format,
                                                                 java.lang.Object... varargs)
      • stringByAppendingPathComponent

        @NotNull
        public @NotNull java.lang.String stringByAppendingPathComponent​(@NotNull
                                                                        @NotNull java.lang.String str)
      • stringByAppendingPathExtension

        @Nullable
        public @Nullable java.lang.String stringByAppendingPathExtension​(@NotNull
                                                                         @NotNull java.lang.String str)
      • stringByAppendingString

        @NotNull
        public @NotNull java.lang.String stringByAppendingString​(@NotNull
                                                                 @NotNull java.lang.String aString)
      • stringByApplyingTransformReverse

        @Nullable
        public @Nullable java.lang.String stringByApplyingTransformReverse​(@NotNull
                                                                           @NotNull java.lang.String transform,
                                                                           boolean reverse)
        Returns nil if reverse not applicable or transform is invalid API-Since: 9.0
      • stringByDeletingLastPathComponent

        @NotNull
        public @NotNull java.lang.String stringByDeletingLastPathComponent()
      • stringByDeletingPathExtension

        @NotNull
        public @NotNull java.lang.String stringByDeletingPathExtension()
      • stringByExpandingTildeInPath

        @NotNull
        public @NotNull java.lang.String stringByExpandingTildeInPath()
      • stringByFoldingWithOptionsLocale

        @NotNull
        public @NotNull java.lang.String stringByFoldingWithOptionsLocale​(long options,
                                                                          @Nullable
                                                                          @Nullable NSLocale locale)
        Returns a string with the character folding options applied. theOptions is a mask of compare flags with *InsensitiveSearch suffix. API-Since: 2.0
      • stringByPaddingToLengthWithStringStartingAtIndex

        @NotNull
        public @NotNull java.lang.String stringByPaddingToLengthWithStringStartingAtIndex​(long newLength,
                                                                                          @NotNull
                                                                                          @NotNull java.lang.String padString,
                                                                                          long padIndex)
      • stringByRemovingPercentEncoding

        @Nullable
        public @Nullable java.lang.String stringByRemovingPercentEncoding()
        Returns a new string made from the receiver by replacing all percent encoded sequences with the matching UTF-8 characters. API-Since: 7.0
      • stringByReplacingCharactersInRangeWithString

        @NotNull
        public @NotNull java.lang.String stringByReplacingCharactersInRangeWithString​(NSRange range,
                                                                                      @NotNull
                                                                                      @NotNull java.lang.String replacement)
        Replace characters in range with the specified string, returning new string. API-Since: 2.0
      • stringByReplacingOccurrencesOfStringWithString

        @NotNull
        public @NotNull java.lang.String stringByReplacingOccurrencesOfStringWithString​(@NotNull
                                                                                        @NotNull java.lang.String target,
                                                                                        @NotNull
                                                                                        @NotNull java.lang.String replacement)
        Replace all occurrences of the target string with replacement. Invokes the above method with 0 options and range of the whole string. API-Since: 2.0
      • stringByReplacingOccurrencesOfStringWithStringOptionsRange

        @NotNull
        public @NotNull java.lang.String stringByReplacingOccurrencesOfStringWithStringOptionsRange​(@NotNull
                                                                                                    @NotNull java.lang.String target,
                                                                                                    @NotNull
                                                                                                    @NotNull java.lang.String replacement,
                                                                                                    long options,
                                                                                                    NSRange searchRange)
        Replace all occurrences of the target string in the specified range with replacement. Specified compare options are used for matching target. 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. API-Since: 2.0
      • stringByReplacingPercentEscapesUsingEncoding

        @Nullable
        @Deprecated
        public @Nullable java.lang.String stringByReplacingPercentEscapesUsingEncoding​(long enc)
        Deprecated.
        API-Since: 2.0 Deprecated-Since: 9.0 Deprecated-Message: Use -stringByRemovingPercentEncoding instead, which always uses the recommended UTF-8 encoding.
      • stringByResolvingSymlinksInPath

        @NotNull
        public @NotNull java.lang.String stringByResolvingSymlinksInPath()
      • stringByStandardizingPath

        @NotNull
        public @NotNull java.lang.String stringByStandardizingPath()
      • stringByTrimmingCharactersInSet

        @NotNull
        public @NotNull java.lang.String stringByTrimmingCharactersInSet​(@NotNull
                                                                         @NotNull NSCharacterSet set)
      • stringsByAppendingPaths

        @NotNull
        public @NotNull NSArray<java.lang.String> stringsByAppendingPaths​(@NotNull
                                                                          @NotNull NSArray<java.lang.String> paths)
      • substringFromIndex

        @NotNull
        public @NotNull java.lang.String substringFromIndex​(long from)
        To avoid breaking up character sequences such as Emoji, you can do: [str substringFromIndex:[str rangeOfComposedCharacterSequenceAtIndex:index].location] [str substringToIndex:NSMaxRange([str rangeOfComposedCharacterSequenceAtIndex:index])] [str substringWithRange:[str rangeOfComposedCharacterSequencesForRange:range]
      • substringToIndex

        @NotNull
        public @NotNull java.lang.String substringToIndex​(long to)
      • substringWithRange

        @NotNull
        public @NotNull java.lang.String substringWithRange​(NSRange range)
        Use with rangeOfComposedCharacterSequencesForRange: to avoid breaking up character sequences
      • _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
      • uppercaseString

        @NotNull
        public @NotNull java.lang.String uppercaseString()
        The following three return the canonical (non-localized) mappings. They are suitable for programming operations that require stable results not depending on the user's locale preference. For locale-aware case mapping for strings presented to users, use the "localized" methods below.
      • uppercaseStringWithLocale

        @NotNull
        public @NotNull java.lang.String uppercaseStringWithLocale​(@Nullable
                                                                   @Nullable NSLocale locale)
        The following methods perform localized case mappings based on the locale specified. Passing nil indicates the canonical mapping. For the user preference locale setting, specify +[NSLocale currentLocale]. API-Since: 6.0
      • variantFittingPresentationWidth

        @NotNull
        public @NotNull java.lang.String variantFittingPresentationWidth​(long width)
        For strings with length variations, such as from a stringsdict file, this method returns the variant at the given width. If there is no variant at the given width, the one for the next smaller width is returned. And if there are none smaller, the smallest available is returned. For strings without variations, this method returns self. The unit that width is expressed in is decided by the application or framework. But it is intended to be some measurement indicative of the context a string would fit best to avoid truncation and wasted space. API-Since: 9.0
      • writeToFileAtomically

        @Deprecated
        public boolean writeToFileAtomically​(@NotNull
                                             @NotNull java.lang.String path,
                                             boolean useAuxiliaryFile)
        Deprecated.
        API-Since: 2.0 Deprecated-Since: 2.0 Deprecated-Message: Use -writeToFile:atomically:encoding:error: instead
      • writeToFileAtomicallyEncodingError

        public boolean writeToFileAtomicallyEncodingError​(@NotNull
                                                          @NotNull java.lang.String path,
                                                          boolean useAuxiliaryFile,
                                                          long enc,
                                                          @Nullable
                                                          @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
      • writeToURLAtomically

        @Deprecated
        public boolean writeToURLAtomically​(@NotNull
                                            @NotNull NSURL url,
                                            boolean atomically)
        Deprecated.
        API-Since: 2.0 Deprecated-Since: 2.0 Deprecated-Message: Use -writeToURL:atomically:encoding:error: instead
      • writeToURLAtomicallyEncodingError

        public boolean writeToURLAtomicallyEncodingError​(@NotNull
                                                         @NotNull NSURL url,
                                                         boolean useAuxiliaryFile,
                                                         long enc,
                                                         @Nullable
                                                         @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        Write to specified url or path using the specified encoding. The optional error return is to indicate file system or encoding errors.
      • itemProviderVisibilityForRepresentationWithTypeIdentifier_static

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

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

        @Nullable
        public static @Nullable NSString 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()
      • writableTypeIdentifiersForItemProvider

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

        @NotNull
        public static @NotNull java.lang.String deferredLocalizedIntentsStringWithFormat​(@NotNull
                                                                                         @NotNull java.lang.String format,
                                                                                         java.lang.Object... varargs)
        Reads the string from the Localizable.strings file in the main app's bundle
      • 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)
        Reads the string from the provided table file in the main app's bundle
      • 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)
        Reads the string from the provided table file in the main app's bundle
      • stringByAppendingPathComponentConformingToType

        @NotNull
        public @NotNull java.lang.String stringByAppendingPathComponentConformingToType​(@NotNull
                                                                                        @NotNull java.lang.String partialName,
                                                                                        @NotNull
                                                                                        @NotNull UTType contentType)
        \brief Generate a path component based on a partial filename and a file type, then append it to a copy of the receiver. \param partialName The partial filename that should be expanded upon, e.g. \c "readme". \param contentType The type the resulting file should conform to, e.g. \c UTTypePlainText. \result A complete file path. Using the argument examples above, this method would return a string with a last path component of \c "readme.txt". Use this method when you have partial input from a user or other source and need to produce a complete filename suitable for that input. For example, if you are downloading a file from the Internet and know its MIME type, you can use this method to ensure the correct filename extension is applied to the URL where you save the file. If \a partialName already has a path extension, and that path extension is valid for file system objects of type \a contentType, no additional extension is appended to the path component before constructing the string. For example, if the inputs are \c "puppy.jpg" and \c UTTypeImage respectively, then the resulting string will have a last path component of \c "puppy.jpg" . On the other hand, if the inputs are \c "puppy.jpg" and \c UTTypePlainText respectively, the resulting string will have a last path component of \c "puppy.jpg.txt" . If you want to ensure any existing path extension is replaced, you can use the \c stringByDeletingPathExtension property first. If the path component could not be appended, this method returns a copy of \c self . API-Since: 14.0
      • stringByAppendingPathExtensionForType

        @NotNull
        public @NotNull java.lang.String stringByAppendingPathExtensionForType​(@NotNull
                                                                               @NotNull UTType contentType)
        \brief Generate a string based on a partial filename or path and a file type. \param contentType The type the resulting file should conform to, e.g. \c UTTypePlainText. \result A complete file path. Using the argument example above and assuming the receiver equals \c "readme" , this method would return \c "readme.txt". Use this method when you have partial input from a user or other source and need to produce a complete filename suitable for that input. For example, if you are downloading a file from the Internet and know its MIME type, you can use this method to ensure the correct filename extension is applied to the URL where you save the file. If the receiver already has a path extension, and that path extension is valid for file system objects of type \a contentType, no additional extension is appended to the receiver before constructing the result. For example, if the receiver equals \c "puppy.jpg" and \a contentType equals \c UTTypeImage , then the resulting string will equal \c "puppy.jpg" . On the other hand, if the inputs are \c "puppy.jpg" and \c UTTypePlainText respectively, the resulting string will equal \c "puppy.jpg.txt" . If you want to ensure any existing path extension is replaced, you can use the \c stringByDeletingPathExtension property first. If the extension could not be appended, this method returns a copy of \c self . API-Since: 14.0
      • sr_sensorForDeletionRecordsFromSensor

        @Nullable
        public @Nullable java.lang.String sr_sensorForDeletionRecordsFromSensor()
        Returns a sensor stream that contains deletion records of the sensor This sensor stream should only be used for fetching. All other operations will be ignored. Deletion records share the recording and authorization state with their parent sensor.
        Returns:
        May return nil if there is no deletion record available for this sensor
      • initWithValidatedFormatValidFormatSpecifiersArgumentsError

        public NSString 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)
        API-Since: 16.0
      • initWithValidatedFormatValidFormatSpecifiersError

        public NSString 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)
        API-Since: 16.0
      • initWithValidatedFormatValidFormatSpecifiersLocaleArgumentsError

        public NSString 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)
        API-Since: 11.0
      • initWithValidatedFormatValidFormatSpecifiersLocaleError

        public NSString 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)
        API-Since: 16.0
      • localizedStringWithValidatedFormatValidFormatSpecifiersError

        @Nullable
        public static @Nullable NSString 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)
        API-Since: 11.0
      • stringWithValidatedFormatValidFormatSpecifiersError

        public static NSString 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)
        API-Since: 11.0
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.