# How to do string Operation on text variables

**URL:** https://community.homey.app/t/how-to-do-string-operation-on-text-variables/31291
**Category:** Questions & Help
**Created:** [June 15, 2020, 3:01pm UTC](https://community.homey.app/t/how-to-do-string-operation-on-text-variables/31291 "2020-06-15T15:01:21Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![mazpo](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mazpo/32/3680_2.png) [@mazpo](https://community.homey.app/u/mazpo)
#### Post date: [June 15, 2020, 3:01pm UTC](https://community.homey.app/t/how-to-do-string-operation-on-text-variables/31291/1 "2020-06-15T15:01:21Z")

</div>

Hi,

i use a ifttt flow which provides a link to an image. i would like to cast this url to nest hub. unfortunaley the link which is accesible via an tag / variable ends with […]&export=download which prevents the nest hub to display the image. When i manually test the link without the postfix it runs.

Does anybody know if it is possible to do string operations (remove las n characters) within homey? maybe with better logic and mathjs?

Thanks in advance

---

<div class="post-metadata">

### Author: ![JPe4619](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jpe4619/32/9017_2.png) [@JPe4619](https://community.homey.app/u/JPe4619)
#### Post date: [June 16, 2020, 3:10pm UTC](https://community.homey.app/t/how-to-do-string-operation-on-text-variables/31291/2 "2020-06-16T15:10:29Z")

</div>

> [@mazpo](#):
>
> &export=download

Maybe you can do it in HomeyScript:  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/9/f/9f60e8587499b5c89f27b8bffeb2b107ad34c724.png)

> **[JavaScript String Methods](https://www.w3schools.com/js/js_string_methods.asp)**
>
> W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.
