The nonparametric Weierstrass integral over a BV curve as a length functional