Chameleon Applications

Chameleon Applications Commit Details

Date:2010-01-22 20:00:15 (14 years 3 months ago)
Author:Rekursor
Commit:40
Parents: 39
Message:moved str_util.h to SOurces folder
Changes:
R/trunk/ChameleonPrefPane/string_util.h → /trunk/ChameleonPrefPane/Sources/string_util.h
M/trunk/ChameleonPrefPane/ChameleonPrefPane.xcodeproj/project.pbxproj

File differences

trunk/ChameleonPrefPane/string_util.h
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
/*
* string_util.h
* ChameleonPrefPane
*
* Created by Rekursor on 1/22/10.
*
*/
/**
* trim the space chars on the right of a sring
*/
inline std::string trim_right(const std::string &source , const std::string& t = " ")
{
std::string str = source;
return str.erase( str.find_last_not_of(t) + 1);
}
/**
* trim the space chars on the left of a sring
*/
inline std::string trim_left( const std::string& source, const std::string& t = " ")
{
std::string str = source;
return str.erase(0 , source.find_first_not_of(t) );
}
/**
* trim the space chars on the left and the right of a string
*/
inline std::string trim(const std::string& source, const std::string& t = " ")
{
std::string str = source;
return trim_left( trim_right( str , t) , t );
}
trunk/ChameleonPrefPane/Sources/string_util.h
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
/*
* string_util.h
* ChameleonPrefPane
*
* Created by Rekursor on 1/22/10.
*
*/
/**
* trim the space chars on the right of a sring
*/
inline std::string trim_right(const std::string &source , const std::string& t = " ")
{
std::string str = source;
return str.erase( str.find_last_not_of(t) + 1);
}
/**
* trim the space chars on the left of a sring
*/
inline std::string trim_left( const std::string& source, const std::string& t = " ")
{
std::string str = source;
return str.erase(0 , source.find_first_not_of(t) );
}
/**
* trim the space chars on the left and the right of a string
*/
inline std::string trim(const std::string& source, const std::string& t = " ")
{
std::string str = source;
return trim_left( trim_right( str , t) , t );
}
trunk/ChameleonPrefPane/ChameleonPrefPane.xcodeproj/project.pbxproj
2020
2121
2222
23
23
2424
2525
2626
......
5858
5959
6060
61
61
6262
6363
6464
......
143143
144144
145145
146
146147
147148
148149
......
157158
158159
159160
160
161161
162162
163163
......
219219
220220
221221
222
222
223223
224224
225225
019930FF110A0E6F003B056E /* PeripheralsController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 019930FD110A0E6F003B056E /* PeripheralsController.mm */; };
01993115110A0EB9003B056E /* AdvancedSetupController.h in Headers */ = {isa = PBXBuildFile; fileRef = 01993113110A0EB9003B056E /* AdvancedSetupController.h */; };
01993116110A0EB9003B056E /* AdvancedSetupController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 01993114110A0EB9003B056E /* AdvancedSetupController.mm */; };
01993197110A2B71003B056E /* string_util.h in Headers */ = {isa = PBXBuildFile; fileRef = 01993196110A2B71003B056E /* string_util.h */; };
01993199110A2C61003B056E /* string_util.h in Headers */ = {isa = PBXBuildFile; fileRef = 01993198110A2C61003B056E /* string_util.h */; };
01A40F75110550F4002A74CD /* CHANGES in Resources */ = {isa = PBXBuildFile; fileRef = 01A40F74110550F4002A74CD /* CHANGES */; };
01B0E8141108B85A00ACF21B /* ChameleonPrefPane.h in Headers */ = {isa = PBXBuildFile; fileRef = 01B0E80E1108B85A00ACF21B /* ChameleonPrefPane.h */; };
01B0E8151108B85A00ACF21B /* ChameleonPrefPane.mm in Sources */ = {isa = PBXBuildFile; fileRef = 01B0E80F1108B85A00ACF21B /* ChameleonPrefPane.mm */; };
019930FD110A0E6F003B056E /* PeripheralsController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = PeripheralsController.mm; path = Sources/PeripheralsController.mm; sourceTree = "<group>"; };
01993113110A0EB9003B056E /* AdvancedSetupController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AdvancedSetupController.h; path = Sources/AdvancedSetupController.h; sourceTree = "<group>"; };
01993114110A0EB9003B056E /* AdvancedSetupController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AdvancedSetupController.mm; path = Sources/AdvancedSetupController.mm; sourceTree = "<group>"; };
01993196110A2B71003B056E /* string_util.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = string_util.h; sourceTree = "<group>"; };
01993198110A2C61003B056E /* string_util.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = string_util.h; path = Sources/string_util.h; sourceTree = SOURCE_ROOT; };
01A40F74110550F4002A74CD /* CHANGES */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CHANGES; sourceTree = "<group>"; };
01B0E80E1108B85A00ACF21B /* ChameleonPrefPane.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChameleonPrefPane.h; path = Sources/ChameleonPrefPane.h; sourceTree = "<group>"; };
01B0E80F1108B85A00ACF21B /* ChameleonPrefPane.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ChameleonPrefPane.mm; path = Sources/ChameleonPrefPane.mm; sourceTree = "<group>"; };
08FB77AFFE84173DC02AAC07 /* Classes */ = {
isa = PBXGroup;
children = (
01993198110A2C61003B056E /* string_util.h */,
01B0E80E1108B85A00ACF21B /* ChameleonPrefPane.h */,
01B0E80F1108B85A00ACF21B /* ChameleonPrefPane.mm */,
019930DF110A0CB4003B056E /* BootSetupController.h */,
01B0E8101108B85A00ACF21B /* process.cpp */,
01B0E8131108B85A00ACF21B /* property_list.h */,
01B0E8121108B85A00ACF21B /* property_list.cpp */,
01993196110A2B71003B056E /* string_util.h */,
);
name = Classes;
sourceTree = "<group>";
019930E8110A0D80003B056E /* BootFlagsController.h in Headers */,
019930FE110A0E6F003B056E /* PeripheralsController.h in Headers */,
01993115110A0EB9003B056E /* AdvancedSetupController.h in Headers */,
01993197110A2B71003B056E /* string_util.h in Headers */,
01993199110A2C61003B056E /* string_util.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};

Archive Download the corresponding diff file

Revision: 40