String Manipulation (OCR GCSE Computer Science): Flashcards

📚Flashcards
String Manipulation
Sign up to keep revising.Create a free account to study more flashcards and track your progress.

Practise the cards

13 cards from this deck

Show

What is string manipulation?

Modifying, analysing & working with text data (strings)

What a string is

A sequence of characters

What does len() function do?

Calculates number of characters in a string

No. of characters in 'Hello, World!'

13 characters

What does upper() method do?

Converts all letters in string to uppercase

What does lower() method do?

Converts all letters in string to lowercase

String slicing purpose

Extracting a smaller part (substring) from a string

What text[0:5] extracts

Characters from index 0 up to (not including) index 5

What is string concatenation?

Joining two or more strings together

Operator for string concatenation

  • operator

What does replace() function do?

Replaces specific parts of string with new text

What does 'in' keyword do in strings?

Checks if substring exists within a string

Practical use: length check

Ensure inputs meet length requirements (e.g., 8 char password)

Explore OCR GCSE Computer Science Revision Notes by Topics

Explore OCR GCSE Computer Science Model Answers by Topics

Explore OCR GCSE Computer Science Quizzes by Topics

Explore OCR GCSE Computer Science Exam Questions by Topics

Join 100,000+ GCSE students studying Flashcards with us.

Select your subjects, and get access to A+ resources today.