126
rated 0 times
[
131]
[
5]
/ answers: 1 / hits: 29574
/ 10 Years ago, tue, august 5, 2014, 12:00:00
in javascript, what is the easiest way to convert this string
798205486e954fa880a0b366e6725f71
to GUID format like this
79820548-6e95-4fa8-80a0-b366e6725f71
this is the messy way I do it :) im looking for the cleanest way
var employeeId = shift.employee.id.substring(0, 8) + - + shift.employee.id.substring(8, 12)
+ - + shift.employee.id.substring(12, 16) + - + shift.employee.id.substring(16, 20) + - + shift.employee.id.substring(20, 32);
More From » string