Properties
Category
Uncategorized
Similar Topics
Statistics
Comments
10
Participants
5
Subscribers
5
Votes
1
Views
754
Share
Answered
E.g. text= "001.2.3"
I want to have a result of text= "00123"
My thought is: First use a sequence to store every single character, that replace every position with "." to "".
So, I write the attached ggb file, but it doesn't work with the REPEAT code:
SetValue(index, 1)
Repeat(Length(templist), If(templist(index)==".", SetValue(templist, index, "" ) ), SetValue(index, index+1))
Can someone correct my mistake?? Many thanks
Files:
remove dots.ggb
- GeoGebra
- Help
- Partners
-
Contact us
- Feedback & Questions
- This email address is being protected from spambots. You need JavaScript enabled to view it.
- +43 677 6137 2693
© 2023 International GeoGebra Institute
Note:
The command Repeat() do not what the name say (it's an impostor)
The bigest problem are conditions.
Repeat(<count>, Execute(<script-list>)) works in te moste situations.
====================================================
to your target
You can use the operator back-slash (\) in combination with Unicode-Commands
UnicodeToText(TextToUnicode("001.2.3") \ TextToUnicode(".")) --> "00123"
Thanks your help~ But why the repeat() can"t do it?
Repeat( <Number>, <Scripting Command>, <Scripting Command>, ... )Repeats the execution of scripting commands n times, where n is the given Number.<--that's exactly what is does in the description.
BTW we'll probably add a new command ReplaceAll("001.2.3",".","") soon to do this
Comments have been locked on this page!