If you are using a tilemap, you can set one, two or more cells next to each other to have the same tile ID, which will look like a single platform. For nice borders I suggest 3 tiles, one for the left edge, one for the right edge, and one for tiles in between. Then you can choose how many tiles width the platform has.
For scripting, take a look at TileMap functions: http://docs.godotengine.org/en/stable/classes/class_tilemap.html
If you don't use a TileMap then you need to use a 3-slice approach, quite the same way. You would need a texture for left edge, one for right edge, and repeat-draw the middle part to fill the gap in between. The tilemap solution is a bit easier though.