diff options
author | Zachary Turner <zturner@google.com> | 2016-11-13 02:50:32 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2016-11-13 02:50:32 +0000 |
commit | 988968394d7f63fe9bc0ec0bfcd5e633d611be1a (patch) | |
tree | 7e8b9b884905f7e3d4e5e2cdc3599e89c3b6136a /lldb/source/Interpreter/CommandObject.cpp | |
parent | 81a78bb8640ba352aa6e28885facdbac3e821d6c (diff) | |
download | llvm-988968394d7f63fe9bc0ec0bfcd5e633d611be1a.zip llvm-988968394d7f63fe9bc0ec0bfcd5e633d611be1a.tar.gz llvm-988968394d7f63fe9bc0ec0bfcd5e633d611be1a.tar.bz2 |
Change some more CommandObject functions to StringRef.
llvm-svn: 286742
Diffstat (limited to 'lldb/source/Interpreter/CommandObject.cpp')
-rw-r--r-- | lldb/source/Interpreter/CommandObject.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lldb/source/Interpreter/CommandObject.cpp b/lldb/source/Interpreter/CommandObject.cpp index e71c109..c9337a5 100644 --- a/lldb/source/Interpreter/CommandObject.cpp +++ b/lldb/source/Interpreter/CommandObject.cpp @@ -316,7 +316,7 @@ int CommandObject::HandleCompletion(Args &input, int &cursor_index, } } -bool CommandObject::HelpTextContainsWord(const char *search_word, +bool CommandObject::HelpTextContainsWord(llvm::StringRef search_word, bool search_short_help, bool search_long_help, bool search_syntax, @@ -341,9 +341,9 @@ bool CommandObject::HelpTextContainsWord(const char *search_word, GetOptions()->GenerateOptionUsage( usage_help, this, GetCommandInterpreter().GetDebugger().GetTerminalWidth()); - if (usage_help.GetSize() > 0) { - const char *usage_text = usage_help.GetData(); - if (strcasestr(usage_text, search_word)) + if (!usage_help.Empty()) { + llvm::StringRef usage_text = usage_help.GetString(); + if (usage_text.contains_lower(search_word)) found_word = true; } } |