Looking for some library for triangulating polyine / path

Hello,

Anyone knows if there is any library for triangulating polyline / path with some thickness?
Something like that:

I know algorithm for it is not complicated and i will be able to code it, but first i would like to know
if there is anything already available.

Thanks!