Clear Filters
Clear Filters

Simple way to wrap quotes around input

3 views (last 30 days)
How to wrap quotes ('...') around a user input string?

Accepted Answer

Image Analyst
Image Analyst on 21 Oct 2016
One way:
str = sprintf('''%s''', usersString)

More Answers (1)

Thorsten
Thorsten on 21 Oct 2016
str = ['''' str ''''];

Categories

Find more on Data Types in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!