Added Capitalize in Rust#1782
Merged
jrg94 merged 4 commits intoTheRenegadeCoder:masterfrom Apr 23, 2020
Merged
Conversation
Convert the string into Title case i.e., capitalize the first letter in the word. Rust, being strictly guarded for memory-safety and Unicode supporting, takes special care in handling strings.
jrg94
requested changes
Oct 26, 2019
Member
jrg94
left a comment
There was a problem hiding this comment.
Input change requested. Also, don't forget to add this to the README.
Capitalise Letter 1 of the Input String
Contributor
Author
|
Have updated the Program to read input from keyboard(Std Input) & print it to monitor (Std Output) |
jrg94
requested changes
Oct 28, 2019
Member
jrg94
left a comment
There was a problem hiding this comment.
We're getting closer! Keep an eye out on the project requirements page for more details: https://sample-programs.therenegadecoder.com/projects/capitalize/
archive/r/rust/capitalize.rs
Outdated
| // Print Updated Value | ||
|
|
||
| println! ("String with letter1 capitalised is {:?}", buff_hold); | ||
| } |
Member
There was a problem hiding this comment.
Indentation seems a bit off here and in other lines.
Suggested change
| } | |
| } |
confirm string is passed as commandline argument
Trim the trailing newline
convert to vector
Change the 1'st letter to capital case
convert to string for printing
/ {} will print string without double quotes
Contributor
Author
|
Should I wait for this pull request to be completed before submitting another pull request? |
Contributor
Author
|
Sorry, for sending pull requests, but if it rains, i cannot connect to internet, sending them .. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Convert the string into Title case i.e., capitalize the first letter in the word.
Rust, being strictly guarded for memory-safety and Unicode supporting, takes special care in handling strings.
Congrats on taking the first step to contributing to the Sample Programs repository maintained by The Renegade Coder! For simplicity, please make sure that your pull request includes one and only one contribution.
Complete the Applicable Sections Below
Find which section best describes your pull request and make sure you fill it out. To start, let us know which issue you've fixed.
Code Snippets
Added/Updated <Sample Program> in <Language>formatDocumentation
Added/Updated <Sample Program> in <Language> ArticleformatTesting
Added/Updated <Language>/<Project> TestingformatNotes
Convert the string into Title case i.e., capitalize the first letter in the word.
Rust, being strictly guarded for memory-safety and Unicode supporting, takes special care in handling strings.
Main program has a function, which is called with 5 different values which is printed to console. So, separate test file isn't necessary.