'Returns lines of the given ``string`` that contain the ``pattern``.
The ``pattern`` is always considered to be a normal string, not a glob
or regexp pattern. A line matches if the ``pattern`` is found anywhere
on it.
The match is case-sensitive by default, but giving ``case_insensitive``
a true value makes it case-insensitive. The value is considered true
if it is a non-empty string that is not equal to ``false`` or ``no``.
If the value is not a string, its truth value is got directly in Python.
Lines are returned as one string catenated back together with
newlines. Possible trailing newline is never returned. The
number of matching lines is automatically logged.
Examples:
| ${lines} = | Get Lines Containing String | ${result} | An example |
| ${ret} =   | Get Lines Containing String | ${ret} | FAIL | case-insensitive |
See `Get Lines Matching Pattern` and `Get Lines Matching Regexp`
if you need more complex pattern matching.'

def get_lines_containing_string(self, string, pattern, case_insensitive=False):

    if is_truthy(case_insensitive):
        pattern = pattern.lower()
        contains = (lambda line: (pattern in line.lower()))
    else:
        contains = (lambda line: (pattern in line))
    return self._get_matching_lines(string, contains)
