0% found this document useful (0 votes)
22 views

String Operations

This document discusses string operations in Module 6. It covers extracting parts of strings using IndexOf and Substring methods. IndexOf is used to find the location of a particular character in a string, while Substring can extract a piece of a string. The objective is to look at interesting ways of extracting information from strings using these and other string methods.

Uploaded by

Luca Kab
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views

String Operations

This document discusses string operations in Module 6. It covers extracting parts of strings using IndexOf and Substring methods. IndexOf is used to find the location of a particular character in a string, while Substring can extract a piece of a string. The objective is to look at interesting ways of extracting information from strings using these and other string methods.

Uploaded by

Luca Kab
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Module 6

Strings

Lecture
String Operations

Module 6 Learning Objectives


Last time, we talked about the string data type.
As a reminder, strings are just sequences of
characters
This time, well look at some more interesting
ways we can extract information from strings

What might we want to do
with strings?
Convert to a value type
(did this last time)
Find a particular
character
Extract part of the
string into a new string
Something else (read
the documentation to
figure out how)
In-Lecture Quiz

We can find the location of a particular character in a
string using

A: a spoon
B: a spork

C: I ndexOf
D: Subst r i ng


In-Lecture Quiz

We can extract a piece of a string using

A: your mind

B: someone elses mind
C: Subst r i ng
D: a series of tubes

Recap
We can use string methods to process strings in
useful ways
End of Module 6
Next Time
Well look at how we can implement decision-
making in the code for our games

You might also like