Struct QStringList

Source
#[repr(C)]
pub struct QStringList { /* private fields */ }
Expand description

The QStringList class provides a list of strings.

Implementations§

Source§

impl QStringList

Source

pub fn contains(&self, str: &QString, cs: CaseSensitivity) -> bool

Returns true if the list contains the string str; otherwise returns false.

Source§

impl QStringList

Source

pub fn filter(&self, str: &QString, cs: CaseSensitivity) -> QStringList

Returns a list of all the strings containing the substring str.

Source§

impl QStringList

Source

pub fn join(&self, separator: &QString) -> QString

Joins all the string list’s strings into a single string with each element separated by the given separator (which can be an empty string).

Source§

impl QStringList

Source

pub fn sort(&mut self, cs: CaseSensitivity)

Sorts the list of strings in ascending order.

Source§

impl QStringList

Source

pub fn replace_in_strings( &mut self, before: &QString, after: &QString, cs: CaseSensitivity, ) -> &mut QStringList

Returns a string list where every string has had the before text replaced with the after text wherever the before text is found. The before text is matched case-sensitively or not depending on the cs flag.

Source§

impl QStringList

Source

pub fn remove_duplicates(&mut self) -> isize

This function removes duplicate entries from a list. The entries do not have to be sorted. They will retain their original order.

Trait Implementations§

Source§

impl Clone for QStringList

Source§

fn clone(&self) -> Self

Constructs a copy of other.

1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for QStringList

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for QStringList

Source§

fn default() -> Self

Constructs an empty list.

Source§

impl Display for QStringList

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for QStringList

Source§

fn drop(&mut self)

Destroys the list.

Source§

impl ExternType for QStringList

Source§

type Id = (Q, S, t, r, i, n, g, L, i, s, t)

A type-level representation of the type’s C++ namespace and type name. Read more
Source§

type Kind = Trivial

Source§

impl From<&QList<QString>> for QStringList

Source§

fn from(list: &QList<QString>) -> Self

Converts a QList<QString> into QStringList.

Source§

impl From<&QString> for QStringList

Source§

fn from(string: &QString) -> Self

Constructs a string list that contains the given string

Source§

impl From<&QStringList> for QList<QString>

Source§

fn from(list: &QStringList) -> Self

Converts a QStringList into a QList<QString>

Source§

impl PartialEq for QStringList

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl QVariantValue for QStringList

Source§

fn can_convert(variant: &QVariant) -> bool

Source§

fn construct(value: &Self) -> QVariant

Source§

fn value_or_default(variant: &QVariant) -> Self

Source§

impl Eq for QStringList

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.