NSString+FLEX.h 933 B

12345678910111213141516171819202122232425262728293031
  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 <Foundation/Foundation.h>
  9. #import "FLEXRuntimeUtility.h"
  10. @interface NSString (FLEXTypeEncoding)
  11. ///@return whether this type starts with the const specifier
  12. @property (nonatomic, readonly) BOOL typeIsConst;
  13. /// @return the first char in the type encoding that is not the const specifier
  14. @property (nonatomic, readonly) FLEXTypeEncoding firstNonConstType;
  15. /// @return whether this type is an objc object of any kind, even if it's const
  16. @property (nonatomic, readonly) BOOL typeIsObjectOrClass;
  17. /// Includes C strings and selectors as well as regular pointers
  18. @property (nonatomic, readonly) BOOL typeIsNonObjcPointer;
  19. @end
  20. @interface NSString (KeyPaths)
  21. - (NSString *)stringByRemovingLastKeyPathComponent;
  22. - (NSString *)stringByReplacingLastKeyPathComponent:(NSString *)replacement;
  23. @end