String matching: Difference between revisions
Content added Content deleted
m (changed wording in the task requirement for better phrasing and for plural agreement.) |
m (added indentation for the numbered bullet points.) |
||
Line 7: | Line 7: | ||
Given two strings, demonstrate the following three types of string matching: |
Given two strings, demonstrate the following three types of string matching: |
||
# Determining if the first string starts with second string |
::# Determining if the first string starts with second string |
||
# Determining if the first string contains the second string at any location |
::# Determining if the first string contains the second string at any location |
||
# Determining if the first string ends with the second string |
::# Determining if the first string ends with the second string |
||
<br> |
<br> |
||
Optional requirements: |
Optional requirements: |
||
# Print the location of the match for part 2 |
::# Print the location of the match for part 2 |
||
# Handle multiple occurrences of a string for part 2. |
::# Handle multiple occurrences of a string for part 2. |
||
<br><br> |
<br><br> |
||