Is there a way to truncate the values in the path data?

I agree with @cpryland here: It isn’t too difficult to parse the string, and it – to me – would feel like cluttering up the APIs if something that can easily be done by us as developers gets “native” helpers.

I have nothing against an external library to do something like this (obviously :wink:) , but since path strings have a clearly specified grammar (and clearly specified semantics), parsing or manipulting them should be the responsibility of the developer and not the API. Including things like this in the APIs (and I guess that XD files store the path strings, so that would really just be an imaginary abstraction layer) would only mean that the APIs get less lightweight, meaning it would get much more difficult to get into plugin development.

More to the point: I think that the closer the APIs are to the “reality” of an XD file, the better (abstraction layers are good, but don’t belong into the APIs, but as third party libraries).

1 Like