Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

1 Answer 1

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 :) –  Dmitrii F. 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.