All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.qt.core.QString Maven / Gradle / Ivy

There is a newer version: 6.3.0
Show newest version
package io.qt.core;


/**
 * 

Java wrapper for Qt class QtJambiStringUtil

*/ public final class QString { static { QtJambi_LibraryUtilities.initialize(); } private QString() throws java.lang.InstantiationError { throw new java.lang.InstantiationError("Cannot instantiate namespace QString."); } /** *

Java wrapper for Qt enum SectionFlag

* * @see SectionFlags */ public enum SectionFlag implements io.qt.QtFlagEnumerator { SectionDefault(0), SectionSkipEmpty(1), SectionIncludeLeadingSep(2), SectionIncludeTrailingSep(4), SectionCaseInsensitiveSeps(8); private SectionFlag(int value) { this.value = value; } /** * {@inheritDoc} */ public int value() { return value; } /** * Create a QFlags of the enum entry. * @return QFlags */ public SectionFlags asFlags() { return new SectionFlags(value); } /** * Combines this entry with other enum entry. * @param e enum entry * @return new flag */ public SectionFlags combined(SectionFlag e) { return new SectionFlags(this, e); } /** * Creates a new {@link SectionFlags} from the entries. * @param values entries * @return new flag */ public static SectionFlags flags(SectionFlag ... values) { return new SectionFlags(values); } /** * Returns the corresponding enum entry for the given value. * @param value * @return enum entry */ public static SectionFlag resolve(int value) { switch (value) { case 0: return SectionDefault; case 1: return SectionSkipEmpty; case 2: return SectionIncludeLeadingSep; case 4: return SectionIncludeTrailingSep; case 8: return SectionCaseInsensitiveSeps; default: throw new io.qt.QNoSuchEnumValueException(value); } } private final int value; } /** * QFlags type for enum {@link SectionFlag} */ public static final class SectionFlags extends io.qt.QFlags implements Comparable { private static final long serialVersionUID = 0x1603b324bac5ace5L; /** * Creates a new SectionFlags where the flags in args are set. * @param args enum entries */ public SectionFlags(SectionFlag ... args){ super(args); } /** * Creates a new SectionFlags with given value. * @param value */ public SectionFlags(int value) { super(value); } /** * Combines this flags with enum entry. * @param e enum entry * @return new SectionFlags */ @Override public final SectionFlags combined(SectionFlag e){ return new SectionFlags(value() | e.value()); } /** * Sets the flag e * @param e enum entry * @return this */ public final SectionFlags setFlag(SectionFlag e){ super.setFlag(e); return this; } /** * Sets or clears the flag flag * @param e enum entry * @param on set (true) or clear (false) * @return this */ public final SectionFlags setFlag(SectionFlag e, boolean on){ super.setFlag(e, on); return this; } /** * Returns an array of flag objects represented by this SectionFlags. * @return array of enum entries */ @Override public final SectionFlag[] flags(){ return super.flags(SectionFlag.values()); } /** * {@inheritDoc} */ @Override public final SectionFlags clone(){ return new SectionFlags(value()); } /** * {@inheritDoc} */ @Override public final int compareTo(SectionFlags other){ return Integer.compare(value(), other.value()); } } public native static java.lang.String arg(java.lang.String string, java.lang.String ... args); public native static java.lang.String chopped(java.lang.String string, int n); public native static java.lang.String format(java.lang.String string, java.lang.Object ... args); public native static java.lang.String left(java.lang.String string, int n); /** *

Overloaded function for {@link #mid(java.lang.String, int, int)} * with n = -1.

*/ public static java.lang.String mid(java.lang.String string, int position) { return mid(string, position, (int)-1); } public native static java.lang.String mid(java.lang.String string, int position, int n); public native static java.lang.String repeated(java.lang.String string, int times); public native static java.lang.String right(java.lang.String string, int n); /** *

Overloaded function for {@link #section(java.lang.String, char, int, int, io.qt.core.QString.SectionFlags)}.

*/ public static java.lang.String section(java.lang.String string, char sep, int start, int end, io.qt.core.QString.SectionFlag ... flags){ return section(string, sep, start, end, new io.qt.core.QString.SectionFlags(flags)); } /** *

Overloaded function for {@link #section(java.lang.String, char, int, int, io.qt.core.QString.SectionFlags)} * with flags = new io.qt.core.QString.SectionFlags(0).

*/ public static java.lang.String section(java.lang.String string, char sep, int start, int end) { return section(string, sep, start, end, new io.qt.core.QString.SectionFlags(0)); } /** *

Overloaded function for {@link #section(java.lang.String, char, int, int, io.qt.core.QString.SectionFlags)}

*

with:

    *
  • end = -1
  • *
  • flags = new io.qt.core.QString.SectionFlags(0)
  • *
*/ public static java.lang.String section(java.lang.String string, char sep, int start) { return section(string, sep, start, (int)-1, new io.qt.core.QString.SectionFlags(0)); } public static java.lang.String section(java.lang.String string, char sep, int start, int end, io.qt.core.QString.SectionFlags flags){ return section_native_cref_QString_QChar_int_int_QFlags_QtJambiStringUtil_SectionFlag_(string, sep, start, end, flags.value()); } private native static java.lang.String section_native_cref_QString_QChar_int_int_QFlags_QtJambiStringUtil_SectionFlag_(java.lang.String string, char sep, int start, int end, int flags); /** *

Overloaded function for {@link #section(java.lang.String, io.qt.core.QRegularExpression, int, int, io.qt.core.QString.SectionFlags)}.

*/ public static java.lang.String section(java.lang.String string, io.qt.core.QRegularExpression re, int start, int end, io.qt.core.QString.SectionFlag ... flags){ return section(string, re, start, end, new io.qt.core.QString.SectionFlags(flags)); } /** *

Overloaded function for {@link #section(java.lang.String, io.qt.core.QRegularExpression, int, int, io.qt.core.QString.SectionFlags)} * with flags = new io.qt.core.QString.SectionFlags(0).

*/ public static java.lang.String section(java.lang.String string, io.qt.core.QRegularExpression re, int start, int end) { return section(string, re, start, end, new io.qt.core.QString.SectionFlags(0)); } /** *

Overloaded function for {@link #section(java.lang.String, io.qt.core.QRegularExpression, int, int, io.qt.core.QString.SectionFlags)}

*

with:

    *
  • end = -1
  • *
  • flags = new io.qt.core.QString.SectionFlags(0)
  • *
*/ public static java.lang.String section(java.lang.String string, io.qt.core.QRegularExpression re, int start) { return section(string, re, start, (int)-1, new io.qt.core.QString.SectionFlags(0)); } public static java.lang.String section(java.lang.String string, io.qt.core.QRegularExpression re, int start, int end, io.qt.core.QString.SectionFlags flags){ return section_native_cref_QString_cref_QRegularExpression_int_int_QFlags_QtJambiStringUtil_SectionFlag_(string, QtJambi_LibraryUtilities.internal.checkedNativeId(re), start, end, flags.value()); } private native static java.lang.String section_native_cref_QString_cref_QRegularExpression_int_int_QFlags_QtJambiStringUtil_SectionFlag_(java.lang.String string, long re, int start, int end, int flags); /** *

Overloaded function for {@link #section(java.lang.String, java.lang.String, int, int, io.qt.core.QString.SectionFlags)}.

*/ public static java.lang.String section(java.lang.String string, java.lang.String in_sep, int start, int end, io.qt.core.QString.SectionFlag ... flags){ return section(string, in_sep, start, end, new io.qt.core.QString.SectionFlags(flags)); } /** *

Overloaded function for {@link #section(java.lang.String, java.lang.String, int, int, io.qt.core.QString.SectionFlags)} * with flags = new io.qt.core.QString.SectionFlags(0).

*/ public static java.lang.String section(java.lang.String string, java.lang.String in_sep, int start, int end) { return section(string, in_sep, start, end, new io.qt.core.QString.SectionFlags(0)); } /** *

Overloaded function for {@link #section(java.lang.String, java.lang.String, int, int, io.qt.core.QString.SectionFlags)}

*

with:

    *
  • end = -1
  • *
  • flags = new io.qt.core.QString.SectionFlags(0)
  • *
*/ public static java.lang.String section(java.lang.String string, java.lang.String in_sep, int start) { return section(string, in_sep, start, (int)-1, new io.qt.core.QString.SectionFlags(0)); } public static java.lang.String section(java.lang.String string, java.lang.String in_sep, int start, int end, io.qt.core.QString.SectionFlags flags){ return section_native_cref_QString_cref_QString_int_int_QFlags_QtJambiStringUtil_SectionFlag_(string, in_sep, start, end, flags.value()); } private native static java.lang.String section_native_cref_QString_cref_QString_int_int_QFlags_QtJambiStringUtil_SectionFlag_(java.lang.String string, java.lang.String in_sep, int start, int end, int flags); /** *

Overloaded function for {@link #split(java.lang.String, char, io.qt.core.Qt.SplitBehavior, io.qt.core.Qt.CaseSensitivity)} * with cs = io.qt.core.Qt.CaseSensitivity.CaseSensitive.

*/ public static io.qt.core.QStringList split(java.lang.String string, char sep, io.qt.core.Qt.SplitBehavior behavior) { return split(string, sep, behavior, io.qt.core.Qt.CaseSensitivity.CaseSensitive); } /** *

Overloaded function for {@link #split(java.lang.String, char, io.qt.core.Qt.SplitBehavior, io.qt.core.Qt.CaseSensitivity)}

*

with:

    *
  • behavior = new io.qt.core.Qt.SplitBehavior(0)
  • *
  • cs = io.qt.core.Qt.CaseSensitivity.CaseSensitive
  • *
*/ public static io.qt.core.QStringList split(java.lang.String string, char sep) { return split(string, sep, new io.qt.core.Qt.SplitBehavior(0), io.qt.core.Qt.CaseSensitivity.CaseSensitive); } public static io.qt.core.QStringList split(java.lang.String string, char sep, io.qt.core.Qt.SplitBehavior behavior, io.qt.core.Qt.CaseSensitivity cs){ return split_native_cref_QString_QChar_QFlags_Qt_SplitBehaviorFlags__Qt_CaseSensitivity(string, sep, behavior.value(), cs.value()); } private native static io.qt.core.QStringList split_native_cref_QString_QChar_QFlags_Qt_SplitBehaviorFlags__Qt_CaseSensitivity(java.lang.String string, char sep, int behavior, int cs); /** *

Overloaded function for {@link #split(java.lang.String, io.qt.core.QRegularExpression, io.qt.core.Qt.SplitBehavior)}.

*/ public static io.qt.core.QStringList split(java.lang.String string, io.qt.core.QRegularExpression sep, io.qt.core.Qt.SplitBehaviorFlags ... behavior){ return split(string, sep, new io.qt.core.Qt.SplitBehavior(behavior)); } /** *

Overloaded function for {@link #split(java.lang.String, io.qt.core.QRegularExpression, io.qt.core.Qt.SplitBehavior)} * with behavior = new io.qt.core.Qt.SplitBehavior(0).

*/ public static io.qt.core.QStringList split(java.lang.String string, io.qt.core.QRegularExpression sep) { return split(string, sep, new io.qt.core.Qt.SplitBehavior(0)); } public static io.qt.core.QStringList split(java.lang.String string, io.qt.core.QRegularExpression sep, io.qt.core.Qt.SplitBehavior behavior){ return split_native_cref_QString_cref_QRegularExpression_QFlags_Qt_SplitBehaviorFlags_(string, QtJambi_LibraryUtilities.internal.checkedNativeId(sep), behavior.value()); } private native static io.qt.core.QStringList split_native_cref_QString_cref_QRegularExpression_QFlags_Qt_SplitBehaviorFlags_(java.lang.String string, long sep, int behavior); /** *

Overloaded function for {@link #split(java.lang.String, java.lang.String, io.qt.core.Qt.SplitBehavior, io.qt.core.Qt.CaseSensitivity)} * with cs = io.qt.core.Qt.CaseSensitivity.CaseSensitive.

*/ public static io.qt.core.QStringList split(java.lang.String string, java.lang.String sep, io.qt.core.Qt.SplitBehavior behavior) { return split(string, sep, behavior, io.qt.core.Qt.CaseSensitivity.CaseSensitive); } /** *

Overloaded function for {@link #split(java.lang.String, java.lang.String, io.qt.core.Qt.SplitBehavior, io.qt.core.Qt.CaseSensitivity)}

*

with:

    *
  • behavior = new io.qt.core.Qt.SplitBehavior(0)
  • *
  • cs = io.qt.core.Qt.CaseSensitivity.CaseSensitive
  • *
*/ public static io.qt.core.QStringList split(java.lang.String string, java.lang.String sep) { return split(string, sep, new io.qt.core.Qt.SplitBehavior(0), io.qt.core.Qt.CaseSensitivity.CaseSensitive); } public static io.qt.core.QStringList split(java.lang.String string, java.lang.String sep, io.qt.core.Qt.SplitBehavior behavior, io.qt.core.Qt.CaseSensitivity cs){ return split_native_cref_QString_cref_QString_QFlags_Qt_SplitBehaviorFlags__Qt_CaseSensitivity(string, sep, behavior.value(), cs.value()); } private native static io.qt.core.QStringList split_native_cref_QString_cref_QString_QFlags_Qt_SplitBehaviorFlags__Qt_CaseSensitivity(java.lang.String string, java.lang.String sep, int behavior, int cs); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy