Build a double-null-terminated UTF-16 multi-string from a list of dependency names.
(deps: &[String])
| 575 | |
| 576 | /// Build a double-null-terminated UTF-16 multi-string from a list of dependency names. |
| 577 | fn deps_to_multi_string(deps: &[String]) -> Vec<u16> { |
| 578 | let mut buf = Vec::new(); |
| 579 | for dep in deps { |
| 580 | buf.extend(dep.encode_utf16()); |
| 581 | buf.push(0); // null terminator for each string |
| 582 | } |
| 583 | if buf.is_empty() { |
| 584 | buf.push(0); // first null for empty multi-string |
| 585 | } |
| 586 | buf.push(0); // final null terminator (double-null) |
| 587 | buf |
| 588 | } |
| 589 | |
| 590 | /// Apply the desired service configuration and status changes, then return the final state. |
| 591 | /// Check whether the given account name is a built-in service account. |
no test coverage detected