Download presentation
Presentation is loading. Please wait.
2
UPPER – Changes stuff to UPPERCASE › “cookie” becomes “COOKIE” lower – Anybody wanna guess? › “DuH LoLoLoL” becomes “duh lololol” Valuable for checking equivalence › Check UPPER (or lower) of string if you want to compare not case sensitive Exercise: Change UNC to Tar Heel
3
Last parameter identifies the instance to replace Very valuable feature How can you find the LAST word? Exercise: Last word
4
Trim › Remember “a ” and “a” aren’t the same › Trim gets rid of leading blanks trailing blanks extra blanks in middle › “ a ” becomes “a” › Very useful when determining if strings equal › Or just eliminating extra whitespace Exercise: test equivalence
5
Proper – Every word starts with a capital letter CAREFUL! “it’s” will become “It’S” How to fix? › Find the ‘ › Fix the next character Let’s do it!
6
1. Process each format › Okay to have errors in intermediate steps › BECAUSE you can hide them 2. Determine which format and select it 1. Identify the format that has a unique characteristic 2. If not that one, what is a unique characteristic for one of the remaining options 3. …
7
Possible formats › Last, First › Last, First M › Last, First Middle › First Last › First M Last › First Middle Last › Last
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.