'How to change session endTime using math in pine?

I´d appreciate if someone could share a pointer on how to change a period of time (user input) using math (basically to unclutter inputs for multiple sessions)

Example:
string sessionInput = input.session("0600-1700", "Session")
string ib_duration = input(45, "Duration in minutes")

Context:
As a result I want to add '45' to the opening (0600) to then replace the endtime by it.
(1700 to become 0645 for the math of a function)

Result:
0600-0645 (being used script internally)

Note:
My main issue is that I found nothing about decomposing the initial string (and my skills are limited). Being well aware that could end in a overkill, I want to avoid adding four more fields to the input area to unclutter it)



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source