From a19aa83b0af4eb60523a064bbd507b5490f407c8 Mon Sep 17 00:00:00 2001 From: Jidong Xiao Date: Sun, 7 Jan 2024 23:30:33 -0500 Subject: [PATCH] adding the string function example --- lectures/01_introduction/README.md | 7 ++++++ lectures/01_introduction/strings.cpp | 33 ++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 lectures/01_introduction/strings.cpp diff --git a/lectures/01_introduction/README.md b/lectures/01_introduction/README.md index c23843b..062273c 100644 --- a/lectures/01_introduction/README.md +++ b/lectures/01_introduction/README.md @@ -287,6 +287,13 @@ object. There are several ways of constructing string objects: This [example program](getline.cpp) is the starting point to most of your homeworks. It shows how you can read information from a file, and write information into another file. +## 1.16 Two Useful String Functions + +- find() +- substr() + +This [example program](strings.cpp) which uses these two string functions, can also be very useful in your homeworks. +