Working with String Methods in Kotlin
📖 Scenario: You are helping a small bookstore organize customer feedback. The feedback comes as a long string with customer names and their comments separated by commas. You want to clean and split this data to make it easier to read and analyze.
🎯 Goal: Build a Kotlin program that trims extra spaces from the feedback string, splits it into individual feedback entries, and extracts the customer names using substring.
📋 What You'll Learn
Create a string variable with the exact feedback text
Create a variable to hold the trimmed version of the feedback string
Split the trimmed string into a list of feedback entries
Extract customer names from each feedback entry using substring
Print the list of customer names
💡 Why This Matters
🌍 Real World
Cleaning and organizing customer feedback or any text data is common in businesses to understand opinions and improve services.
💼 Career
Knowing how to manipulate strings is essential for software developers, data analysts, and anyone working with text processing or user input.
Progress0 / 4 steps