This may sound like a stupid question and probably is… but is there a way to only use partial content of a string variable?
I am pulling a string variable of a date from PlayFab (online services), this returns a date for the end time of a leaderboard, and the string looks like this: 2023-10T00:00:00Z
I want to hook up the date to my UI but i don’t want to type it manually because the reset times will change and never be the same, so i need to somehow format it in a way where i am able to pull only the first part of the string? I Hope this makes sense.
Support for string parsing is not optimal. LeftChop / RightChop assumes there is a constant amount of characters in the string with no option to validate the result. Another risk you take is that the online service always returns this time string. What if some day the server errors and your UI posts an entire error result of the network? It’s just an example but it’s a bad practice to assume external data is formatted properly. In cases it can cause security holes as well.