TBToken.h 880 B

1234567891011121314151617181920212223242526272829303132333435
  1. //
  2. // TBToken.h
  3. // TBTweakViewController
  4. //
  5. // Created by Tanner on 3/22/17.
  6. // Copyright © 2017 Tanner Bennett. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. typedef NS_OPTIONS(NSUInteger, TBWildcardOptions)
  10. {
  11. TBWildcardOptionsNone = 0,
  12. TBWildcardOptionsAny = 1,
  13. TBWildcardOptionsPrefix = 1 << 1,
  14. TBWildcardOptionsSuffix = 1 << 2,
  15. };
  16. /// A token may contain wildcards at one or either end,
  17. /// but not in the middle of the token (as of now).
  18. @interface TBToken : NSObject
  19. + (instancetype)string:(NSString *)string options:(TBWildcardOptions)options;
  20. /// Will not contain the wildcard (*) symbol
  21. @property (nonatomic, readonly) NSString *string;
  22. @property (nonatomic, readonly) TBWildcardOptions options;
  23. /// Opposite of "is ambiguous"
  24. @property (nonatomic, readonly) BOOL isAbsolute;
  25. @property (nonatomic, readonly) BOOL isAny;
  26. @end