TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a macro, say defined as follows:

\edef \temp{A.input 1}

I want to replace the dot with hyphen and have the result being stored in \mystart. Something like that:

\edef \mystart{\StrSubstitute{\temp}{.}{-}}

\show \mystart should ouput A-input 1.

I've messed up with many variants, but none of them works.

share|improve this question
up vote 7 down vote accepted

Syntax:

\StrSubstitute[<number>]{<string>}{<stringA>}{<stringB>}[<name>]

Usage:

\StrSubstitute{\temp}{.}{-}[\mystart]
share|improve this answer
    
I must be blind. Shame on me :) – Dmitry Volosnykh Apr 22 '11 at 15:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.