NSString+FLEX.h 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. //
  2. // NSString+FLEX.h
  3. // FLEX
  4. //
  5. // Created by Tanner on 3/26/17.
  6. // Copyright © 2017 Tanner Bennett. All rights reserved.
  7. //
  8. #import "FLEXRuntimeConstants.h"
  9. @interface NSString (FLEXTypeEncoding)
  10. ///@return whether this type starts with the const specifier
  11. @property (nonatomic, readonly) BOOL flex_typeIsConst;
  12. /// @return the first char in the type encoding that is not the const specifier
  13. @property (nonatomic, readonly) FLEXTypeEncoding flex_firstNonConstType;
  14. /// @return whether this type is an objc object of any kind, even if it's const
  15. @property (nonatomic, readonly) BOOL flex_typeIsObjectOrClass;
  16. /// @return the class named in this type encoding if it is of the form \c @"MYClass"
  17. @property (nonatomic, readonly) Class flex_typeClass;
  18. /// Includes C strings and selectors as well as regular pointers
  19. @property (nonatomic, readonly) BOOL flex_typeIsNonObjcPointer;
  20. @end
  21. @interface NSString (KeyPaths)
  22. - (NSString *)stringByRemovingLastKeyPathComponent;
  23. - (NSString *)stringByReplacingLastKeyPathComponent:(NSString *)replacement;
  24. @end