replacing string characters

  • Nobody/Anonymous

    Hi.  newbie here.  I'm trying to replace the semi-colon character " ; " in the text of an entry box before passing the text on to another widget, but "string" does not recognize " ; " as a valid string character?  The command seems to handle the colon character just fine.  Is there any way around this?

    On a related note, why are some options for "string" not available in SpecTcl?  e.g. "string map arg arg" returns a "bad option" error, as does "string replace".

    Thanks in advance.


    • Nobody/Anonymous

      I'm not quite sure what you mean - maybe post your exact code if this does not answer your question.

      There is a big difference in the way Tcl interprets the semicolon and the colon characters. The colon is just another character (like the alphanumeric characters), whereas the semicolon is a command separator unless it is escaped with a \ or inside {}

      Wrt string replace: maybe the number of arguments is incorrect.



Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks