Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused MISC::count_str() #957

Merged
merged 1 commit into from
Apr 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 0 additions & 18 deletions src/jdlib/miscutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -535,24 +535,6 @@ std::string MISC::recover_quot( const std::string& str )
}


//
// str 中に含まれている str2 の 数を返す
//
int MISC::count_str( const std::string& str, const std::string& str2 )
{
int count = 0;
size_t found, pos = 0;

while( ( found = str.find( str2, pos ) ) != std::string::npos )
{
++count;
pos = found + 1;
}

return count;
}


//
// 文字列(utf-8も) -> 整数変換
//
Expand Down
3 changes: 0 additions & 3 deletions src/jdlib/miscutil.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,6 @@ namespace MISC
// \" を " に置き換え
std::string recover_quot( const std::string& str );

// str 中に含まれている str2 の 数を返す
int count_str( const std::string& str, const std::string& str2 );

// 文字列(utf-8も) -> 整数変換
// (例) "123" -> 123
// 入力: str
Expand Down