### The Maxima on-line user's manual

Algebra Calculator

#### Ssubst

Function: ssubst (<new>, <old>, <string>)

Function: ssubst (<new>, <old>, <string>, <test>)

Function: ssubst (<new>, <old>, <string>, <test>, <start>)

Function: ssubst (<new>, <old>, <string>, <test>, <start>, <end>) Returns a string like <string> except that all substrings matching <old> are replaced by <new>. <old> and <new> need not to be of the same length. Default test function for matching is `sequal`. If `ssubst` should ignore case while searching for old, use `sequalignore` as test. Use <start> and <end> to limit searching. Note that the first character in <string> is in position 1.

```          (%i1) ssubst("like","hate","I hate Thai food. I hate green tea.");
(%o1)          I like Thai food. I like green tea.
(%i2) ssubst("Indian","thai",%,sequalignore,8,12);
(%o2)         I like Indian food. I like green tea.```

There are also some inexact matches for `ssubst`. Try `?? ssubst` to see them.

```(%o1)                                true
(%i2) ```

### Related Examples

##### ssubst-subst

ssubst(".",",","1,25");

Calculate

? ssubst;

Calculate

? ssubst;

Calculate

##### ssubst-string

S_Einheit: km/h;

S_Formel: s/t;

sechs_S: ssubst("h","...

Calculate

##### ssubst-string

S_Einheit: km/h;

S_Formel: s/t;

sechs_S: ssubst("t","...

Calculate

##### ssubst-subst

ssubst(".",",","x/10+...

Calculate

##### ssubst

eq1: H_1= -w^2*M_c+K_...

eq2: H_2= -w^2*M_s+K_...

eq3: H_12= K_s-%i*w*C_s;

Calculate

##### ssubst-subst

ssubst(".",",","x/10+...

Calculate

##### ssubst-subst

ssubst(".",",","1,25");

Calculate

##### ssubst-subst

ssubst("km","s","kmsk...

Calculate