Suppose, I have a string
ContactMap(const core::data::structural::Structure &structure, double cutoff_distance, core::data::structural::selectors::AtomSelector_SP atoms_in_contact=nullptr)
I need to create a string of *
(asterisks) of the same length.
I can think of the following two techniques:
- calculate the length of the string, and use a for loop to create a string of the same length
- take a copy of the string, and replace each character with an
*
(asterisk)
Do you have any other ideas?
What is the fastest way to do this?