Skip to content

Commit 89392c9

Browse files
authored
Merge pull request #34177 from wwlpublish/8f912b81c2cb3e06d0df1011b4ef8218-live
Modules/M05-modify-string-content-using-built-in-string-methods-c-sharp
2 parents d641b61 + 9ed65f6 commit 89392c9

16 files changed

+24
-21
lines changed

learn-pr/wwl-language/csharp-modify-content/1-introduction.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Introduction
44
metadata:
55
title: Introduction
66
description: "Introduction"
7-
ms.date: 04/18/2023
7+
ms.date: 04/25/2023
88
author: wwlpublish
99
ms.author: eric
1010
ms.topic: interactive-tutorial

learn-pr/wwl-language/csharp-modify-content/2-exercise-indexof-substring.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Exercise - Use the string's IndexOf() and Substring() helper methods
44
metadata:
55
title: Exercise - Use the string's IndexOf() and Substring() helper methods
66
description: "Exercise - Use the string's IndexOf() and Substring() helper methods"
7-
ms.date: 04/18/2023
7+
ms.date: 04/25/2023
88
author: wwlpublish
99
ms.author: eric
1010
ms.topic: interactive-tutorial

learn-pr/wwl-language/csharp-modify-content/3-exercise-lastindexof-indexofany.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Exercise - Use the string's IndexOfAny() and LastIndexOf() helper methods
44
metadata:
55
title: Exercise - Use the string's IndexOfAny() and LastIndexOf() helper methods
66
description: "Exercise - Use the string's IndexOfAny() and LastIndexOf() helper methods"
7-
ms.date: 04/18/2023
7+
ms.date: 04/25/2023
88
author: wwlpublish
99
ms.author: eric
1010
ms.topic: interactive-tutorial

learn-pr/wwl-language/csharp-modify-content/4-exercise-remove-replace.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Exercise - Use the Remove() and Replace() methods
44
metadata:
55
title: Exercise - Use the Remove() and Replace() methods
66
description: "Exercise - Use the Remove() and Replace() methods"
7-
ms.date: 04/18/2023
7+
ms.date: 04/25/2023
88
author: wwlpublish
99
ms.author: eric
1010
ms.topic: interactive-tutorial

learn-pr/wwl-language/csharp-modify-content/5-exercise-challenge-extract-replace-remove-data.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: 'Exercise: Complete a challenge to extract, replace, and remove data from
44
metadata:
55
title: 'Exercise: Complete a challenge to extract, replace, and remove data from an input string'
66
description: "Exercise: Complete a challenge to extract, replace, and remove data from an input string"
7-
ms.date: 04/18/2023
7+
ms.date: 04/25/2023
88
author: wwlpublish
99
ms.author: eric
1010
ms.topic: interactive-tutorial

learn-pr/wwl-language/csharp-modify-content/6-review-solution-extract-replace-remove-data.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Review the solution to extract, replace, and remove data from an input st
44
metadata:
55
title: Review the solution to extract, replace, and remove data from an input string
66
description: "Review the solution to extract, replace, and remove data from an input string"
7-
ms.date: 04/18/2023
7+
ms.date: 04/25/2023
88
author: wwlpublish
99
ms.author: eric
1010
ms.topic: interactive-tutorial

learn-pr/wwl-language/csharp-modify-content/7-knowledge-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Knowledge check
44
metadata:
55
title: Knowledge check
66
description: "Knowledge check"
7-
ms.date: 04/18/2023
7+
ms.date: 04/25/2023
88
author: wwlpublish
99
ms.author: eric
1010
ms.topic: interactive-tutorial

learn-pr/wwl-language/csharp-modify-content/8-summary.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Summary
44
metadata:
55
title: Summary
66
description: "Summary"
7-
ms.date: 04/18/2023
7+
ms.date: 04/25/2023
88
author: wwlpublish
99
ms.author: eric
1010
ms.topic: interactive-tutorial

learn-pr/wwl-language/csharp-modify-content/includes/1-introduction.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11

22

3+
34
Suppose you are as a developer on an application to enable users of a business to update a "last chance deals" website by sending email to a specific site used by the application. The site update email uses *special* text in title and body to instruct the automation how to update the website, including what text to extract and post to the website.
45

56
Frequently, application data you need to work with from other software systems has data you don't want or need. The data is in a format that is unusable, containing *extra* information that makes the important information difficult to extract. When this happens, you need tools and techniques to parse through string data, isolate the information you need, and remove the information you don't need.

learn-pr/wwl-language/csharp-modify-content/includes/2-exercise-indexof-substring.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11

22

3-
In this exercise, you'll use the `IndexOf()` method to locate the position of one character or string inside a larger string.
43

5-
You'll begin by accessing parts of a string by identifying the position of one or more characters. Once you've located the position, you can then extract a specific part of the string.
4+
In this exercise, you use the `IndexOf()` method to locate the position of one or more characters string inside a larger string. You use the `Substring()` method to return the part of the larger string that follows the character positions you specify.
65

7-
Once you've located the position, you can use the `Substring()` method to return the rest of the string after the position.
8-
9-
You could also use an overloaded version of the `Substring()` method to set the length of characters to return after the position.
6+
You'll also use an overloaded version of the `Substring()` method to set the length of characters to return after a specified position in a string.
107

118
### Prepare your coding environment
129

13-
This module includes hands-on activities that guide you through the process of building and running demonstration code. You're encouraged to complete these activities using Visual Studio Code as your development environment. Using Visual Studio Code for these activities will help you to become more comfortable writing and running code in a developer environment that's used by professionals worldwide.
10+
This module includes hands-on activities that guide you through the process of building and running demonstration code. You're encouraged to complete these activities using Visual Studio Code as your development environment. Using Visual Studio Code for these activities help you to become more comfortable writing and running code in a developer environment that's used by professionals worldwide.
1411

1512
> [!NOTE]
1613
> If you have completed other Microsoft Learn modules in this C# series, you may have already created a project folder for code samples. If that's the case, you can skip the following section of steps, and delete the code in the `Project.cs` file used for a previous exercise.
@@ -49,7 +46,7 @@ This module includes hands-on activities that guide you through the process of b
4946
5047
1. Delete the existing code lines.
5148
52-
You'll be using this C# console project to create, build, and run code samples during this module.
49+
You are using this C# console project to create, build, and run code samples during this module.
5350
5451
1. Close the Terminal panel.
5552
@@ -121,7 +118,7 @@ This module includes hands-on activities that guide you through the process of b
121118
122119
The `Substring()` method needs the starting position and the number of characters, or length, to retrieve. So, you calculate the length in a temporary variable called `length`, and pass it with the `openingPosition` value to retrieve the string inside of the parenthesis.
123120
124-
The result is close, however the output includes the opening parenthesis. In this exercise, the inclusion of the parenthesis isn't desired. To remove the parenthesis from output, you'll have to update the code to skip the index of the parenthesis itself.
121+
The result is close, however the output includes the opening parenthesis. In this exercise, the inclusion of the parenthesis isn't desired. To remove the parenthesis from output, you have to update the code to skip the index of the parenthesis itself.
125122
126123
### Modify the starting position of the sub string
127124
@@ -200,7 +197,7 @@ Hardcoded strings like `"<span>"` in the previous code listing are known as "mag
200197
201198
The code uses a constant with the `const` keyword. A constant allows you to define and initialize a variable whose value can never be changed. You would then use that constant in the rest of the code whenever you needed that value. This ensures that the value is only defined once and misspelling the `const` variable will be caught by the compiler.
202199
203-
The pervious code listing is a safer way to write the same code you examined in the previous section. Now, if the value of `openSpan` changes to `<div>`, the line of code that uses the `Length` property will continue to be valid.
200+
The pervious code listing is a safer way to write the same code you examined in the previous section. Now, if the value of `openSpan` changes to `<div>`, the line of code that uses the `Length` property continues to be valid.
204201
205202
## Recap
206203

0 commit comments

Comments
 (0)