forked from onevcat/VVDocumenter-Xcode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVVArgument.m
More file actions
executable file
·34 lines (29 loc) · 1.08 KB
/
VVArgument.m
File metadata and controls
executable file
·34 lines (29 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
//
// Argument.m
// CommentTest
//
// Created by 王 巍 on 13-7-19.
// Copyright (c) 2013年 OneV's Den. All rights reserved.
//
#import "VVArgument.h"
@implementation VVArgument
-(void)setType:(NSString *)type
{
if (type != _type) {
_type = [[[type vv_stringByReplacingRegexPattern:@"&$" withString:@""]
vv_stringByReplacingRegexPattern:@"\\s*\\*$" withString:@""]
stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
}
}
-(void)setName:(NSString *)name
{
if (name != _name) {
_name = [[[[[[name vv_stringByReplacingRegexPattern:@"^&" withString:@""]
vv_stringByReplacingRegexPattern:@"^\\*+" withString:@""]
vv_stringByReplacingRegexPattern:@"\\[.*$" withString:@""]
vv_stringByReplacingRegexPattern:@",$" withString:@""]
vv_stringByReplacingRegexPattern:@";$" withString:@""]
stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
}
}
@end