#[repr(u32)]pub enum StrOp {
Show 22 variants
Concat = 0,
Replicate = 1,
Len = 2,
Getc = 3,
Putc = 4,
ToUpper = 5,
ToLower = 6,
Compare = 7,
ICompare = 8,
Substr = 9,
AToI = 10,
AToHex = 11,
AToOct = 12,
AToBin = 13,
IToA = 14,
HexToA = 15,
OctToA = 16,
BinToA = 17,
FromBits = 18,
ToBitsLo = 19,
ToBitsHi = 20,
ToBitsWord = 21,
}Expand description
A string operation, by the code codegen passes to sv_rt_str_op.
Variants§
Concat = 0
{a, b}.
Replicate = 1
{b{a}}.
Len = 2
a.len().
Getc = 3
a.getc(b) (0 out of range).
Putc = 4
a with a.putc(b, c) applied (unchanged out of range or for 0).
ToUpper = 5
ToLower = 6
Compare = 7
a.compare(b): C strcmp’s result.
ICompare = 8
a.icompare(b): case-insensitive compare.
Substr = 9
a.substr(b, c) ("" out of range).
AToI = 10
a.atoi() / atohex / atooct / atobin: the leading number
(underscores ignored), as a 32-bit integer.
AToHex = 11
AToOct = 12
AToBin = 13
IToA = 14
The string of integer a: itoa (signed decimal of the
c & 0xff-bit value, sign-extended when c & 0x100), hextoa,
octtoa, bintoa.
HexToA = 15
OctToA = 16
BinToA = 17
FromBits = 18
The string of the c-bit integral value b:a (high:low 64 bits):
its bytes, most significant first, NUL bytes dropped (§6.16).
ToBitsLo = 19
The low / high 64 bits of string a as a b-bit integral value
(its last character in the least significant byte).
ToBitsHi = 20
ToBitsWord = 21
64-bit word c (0 least significant) of string a as a b-bit
integral value, for any width.
Implementations§
Trait Implementations§
impl Copy for StrOp
impl Eq for StrOp
impl StructuralPartialEq for StrOp
Auto Trait Implementations§
impl Freeze for StrOp
impl RefUnwindSafe for StrOp
impl Send for StrOp
impl Sync for StrOp
impl Unpin for StrOp
impl UnsafeUnpin for StrOp
impl UnwindSafe for StrOp
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.