Skip to content

Added Capitalize in Rust#1782

Merged
jrg94 merged 4 commits intoTheRenegadeCoder:masterfrom
msj2:patch-2
Apr 23, 2020
Merged

Added Capitalize in Rust#1782
jrg94 merged 4 commits intoTheRenegadeCoder:masterfrom
msj2:patch-2

Conversation

@msj2
Copy link
Contributor

@msj2 msj2 commented Oct 26, 2019

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

  • I named the pull request using Added/Updated <Sample Program> in <Language> format
  • I created/updated the language README
    • I added the sample program name to the README
    • I added fun facts (i.e. debut, developer, typing, etc.)
    • I added reference link(s) to the README
    • I added solution citations when necessary (see plagiarism)

Documentation

  • I named the pull request using Added/Updated <Sample Program> in <Language> Article format
  • I followed the applicable article template

Testing

  • [] I named the pull request using Added/Updated <Language>/<Project> Testing format
  • I followed the testinfo template, if applicable

Notes

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.

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 jrg94 requested a review from a team October 26, 2019 21:54
@jrg94 jrg94 self-assigned this Oct 26, 2019
@jrg94 jrg94 added capitalize See: https://sampleprograms.io/projects/capitalize/ enhancement Any code that improves the repo hacktoberfest Hacktoberfest related labels Oct 26, 2019
@jrg94 jrg94 added this to the 500 Code Snippets milestone Oct 26, 2019
Copy link
Member

@jrg94 jrg94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Input change requested. Also, don't forget to add this to the README.

@jrg94 jrg94 changed the title captilize.rs Added Capitalize in Rust Oct 27, 2019
Capitalise Letter 1 of the Input String
@msj2
Copy link
Contributor Author

msj2 commented Oct 28, 2019

Have updated the Program to read input from keyboard(Std Input) & print it to monitor (Std Output)

Copy link
Member

@jrg94 jrg94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're getting closer! Keep an eye out on the project requirements page for more details: https://sample-programs.therenegadecoder.com/projects/capitalize/

// Print Updated Value

println! ("String with letter1 capitalised is {:?}", buff_hold);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation seems a bit off here and in other lines.

Suggested change
}
}

msj2 added 2 commits October 31, 2019 16:01
 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
@msj2
Copy link
Contributor Author

msj2 commented Oct 31, 2019

Should I wait for this pull request to be completed before submitting another pull request?

@msj2
Copy link
Contributor Author

msj2 commented Oct 31, 2019

Sorry, for sending pull requests, but if it rains, i cannot connect to internet, sending them ..

@msj2 msj2 closed this Oct 31, 2019
@jrg94 jrg94 reopened this Apr 23, 2020
@jrg94 jrg94 merged commit 8e2af04 into TheRenegadeCoder:master Apr 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

capitalize See: https://sampleprograms.io/projects/capitalize/ enhancement Any code that improves the repo hacktoberfest Hacktoberfest related

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Add Capitalize in Rust

2 participants