From a6e588aafa4be895e1366fbf9b23eedfd671d4b8 Mon Sep 17 00:00:00 2001 From: Schuyler Grisham Date: Tue, 20 Sep 2016 18:57:45 -0400 Subject: [PATCH 1/5] attempt at string search code challenge --- string_search.php | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 string_search.php diff --git a/string_search.php b/string_search.php new file mode 100644 index 0000000..1fdcd74 --- /dev/null +++ b/string_search.php @@ -0,0 +1,10 @@ + From 92286475dd252e7d36be9a33c2f159a333070952 Mon Sep 17 00:00:00 2001 From: Schuyler Grisham Date: Tue, 20 Sep 2016 19:07:21 -0400 Subject: [PATCH 2/5] second attempt --- string_search.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/string_search.php b/string_search.php index 1fdcd74..104818e 100644 --- a/string_search.php +++ b/string_search.php @@ -5,6 +5,8 @@ function string_search($needle, $haystack){ return false; } elseif($position) { return "Found '$needle' at index $position"; + } else { + return false; } } ?> From 9f7bceb70a62f628ce7988bd8d8aa2ac8dbcfa87 Mon Sep 17 00:00:00 2001 From: Schuyler Grisham Date: Tue, 20 Sep 2016 19:13:50 -0400 Subject: [PATCH 3/5] attempt 3 at code challenge --- string_search.php | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/string_search.php b/string_search.php index 104818e..0215185 100644 --- a/string_search.php +++ b/string_search.php @@ -1,12 +1,18 @@ From b10123c604804a36a0b1ab11f4490d02dc415533 Mon Sep 17 00:00:00 2001 From: Schuyler Grisham Date: Tue, 20 Sep 2016 19:14:35 -0400 Subject: [PATCH 4/5] attempt 3.2 at code challenge --- string_search.php | 1 + 1 file changed, 1 insertion(+) diff --git a/string_search.php b/string_search.php index 0215185..ebce7b2 100644 --- a/string_search.php +++ b/string_search.php @@ -15,4 +15,5 @@ function string_search($needle, $haystack){ } return false; } +} ?> From 2131c114825a8deb0e548e792f10cb766e56e400 Mon Sep 17 00:00:00 2001 From: Schuyler Grisham Date: Tue, 20 Sep 2016 19:21:07 -0400 Subject: [PATCH 5/5] attempt 4 at code challenge --- string_search.php | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/string_search.php b/string_search.php index ebce7b2..1724751 100644 --- a/string_search.php +++ b/string_search.php @@ -1,19 +1,10 @@