Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
string formatting in FS?
![adamohern](https://profiles.onshape.com/dab81bace5be14f48b1e57392650393d866dd743c16c049212803a9da498b556.png)
I'm used to Python's string formatting, where I can insert variables into a longer string and the result is concatenated automatically. Is there anything similar in FS? In the example below, look how much more readable the Python example is.
Python:
Python:
"Hello, my name is %s and I like to eat %s on %s." % (name, food, day_of_week)or
"Hello, my name is {} and I like to eat {} on {}.".format(name, food, day_of_week)vs FeatureScript (AFAIK):
"Hello, my name is " ~ name ~ " and I like to eat " ~ food ~ " on " ~ day_of_week ~ "."
0
Comments
This is NOT available today – your quotes and twiddles solution is currently the only way to go.