Skip to main content

pad_channel

Function pad_channel 

Source
pub fn pad_channel(ch: u8) -> String
Expand description

Formats a LabJack channel number as the chNN token used in subjects.

The number is zero-padded to at least two digits.

§Arguments

  • ch - LabJack channel number.

§Examples

pad_channel(3)   -> "ch03"
pad_channel(11)  -> "ch11"
pad_channel(120) -> "ch120"