Go to the source code of this file.
◆ strip_comments()
void strip_comments |
( |
std::string & |
s, |
|
|
bool |
strip_lf |
|
) |
| |
Definition at line 9 of file strip_comments.cpp.
10{
14 {
15 if (
src[0] ==
'/' &&
src[1] ==
'/' )
16 {
18 while ( *
src && *
src !=
'\n' )
22 }
23 else if (
src[0] ==
'/' &&
src[1] ==
'*' )
24 {
27 if ( !newsrc )
28 break;
30
31
34 }
35 else if (
src[0] ==
'\r' && strip_lf )
37 else
39 }
41
42 s.resize (
dst-&
s[0] );
43}
char * strstr(char *String1, char *String2)
Referenced by import_file().