From the course: Nail Your C# Interview
Unlock the full course today
Join today to access over 24,700 courses taught by industry experts.
Create algorithm-driven strings in C# - C# Tutorial
From the course: Nail Your C# Interview
Create algorithm-driven strings in C#
- [Instructor] Another standard programing task is to create a new string based on input data. We've seen this a bit previously with toLower where a string is inputted into the function and a new string is created using the data from the input string. This was built into the standard library but let's try creating our own function that dynamically builds a string using input data. The algorithm we'll create will build the reverse of whatever string is inputted. It'll reverse the string. Now we'll want to cover our base cases where the string is null or empty. And we'll use a built-in function to do that. When starting your software development journey, sometimes it can feel like you're cheating by using the functions built into the language or the standard library but this is not cheating. Software engineering is about using the best tools for the job to create the most accurate output through the most efficient…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
Concatenate strings with different methods2m 49s
-
(Locked)
Normalize string input4m 55s
-
(Locked)
Validate string input6m 47s
-
(Locked)
Access data from strings7m 30s
-
(Locked)
Create algorithm-driven strings in C#7m
-
(Locked)
Solution: Developing a palindrome checker3m 38s
-
(Locked)
Solution: Reverse each word2m 15s
-
-
-
-
-