Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions exercises/concept/squeaky-clean/.docs/instructions.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
# Instructions

In this exercise you will implement a partial set of utility routines to help a developer
clean up identifier names.

In the 5 tasks you will gradually build up the routine `Clean` A valid identifier comprises
zero or more letters and underscores.

In all cases the input string is guaranteed to be non-null. If an empty string is passed to the `Clean` function, an empty string should be returned.

In this exercise, you will implement a partial set of utility routines to help a developer clean up identifier names.
In the 5 tasks you will gradually build up the routine `Clean`.
A valid identifier comprises zero or more letters and underscores.
In all cases, the input string is guaranteed to be non-null.
If an empty string is passed to the `Clean` function, an empty string should be returned.
Note that the caller should avoid calling the routine `Clean` with an empty identifier since such identifiers are ineffectual.

## 1. Replace any spaces encountered with underscores

Implement the (_static_) `Identifier.Clean()` method to replace any spaces with underscores. This also applies to leading and trailing spaces.
Implement the (_static_) `Identifier.Clean()` method to replace any spaces with underscores.
This also applies to leading and trailing spaces.

```csharp
Identifier.Clean("my Id");
Expand Down
Loading