# How to Cutright from a char str: can't get it work

**URL:** <https://community.mp3tag.de/t/how-to-cutright-from-a-char-str-cant-get-it-work/61389>\
**Category:** Support\
**Created:** [June 26, 2023, 1:24pm UTC](https://community.mp3tag.de/t/how-to-cutright-from-a-char-str-cant-get-it-work/61389 "2023-06-26T13:24:09Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)\
**Post date:** [June 27, 2023, 5:06am UTC](https://community.mp3tag.de/t/how-to-cutright-from-a-char-str-cant-get-it-work/61389/5 "2023-06-27T05:06:47Z")

</div>

Has the converter worked?

> [@dec](#):
>
> but, why didn't using cutright and strstr work?

You don't explain what did not work.  
Have you checked which position `

> [@dec](#):
>
> $strstr(%title%,norm))

returns and how many characters from the right that would be?

I tried to explain the basic behaviour of $cutright() in this post for you:

> [@Odd STRCHR Error](https://community.mp3tag.de/t/odd-strchr-error/61310/7):
>
> $cutright does not "cut from the right" but - as the documentation tells you: $cutRight(x,n) removes the last n characters of string x and returns the result. The accidental result with Billie Holiday only works because the part in front of the hyphen is just as long as the part behind it. Bill Withers has the hyphen at position 14 and if you remove the 14 characters on the right with $cutright() you end up with the string shown in the preview. If you want to cut the filename so that only th…

You would have to calculate either how many characters you want to keep and use $left() or how many characters you would have to include if you want to cut off a part of a string from the right.  
And if you want to find a variable position in a string and use $cutright() (instead of $left()) then you have to subtract that position from the total length of the string.

---

_[View the full topic](https://community.mp3tag.de/t/how-to-cutright-from-a-char-str-cant-get-it-work/61389)._
