| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533 |
- // WARNING - AUTOGENERATED - DO NOT EDIT
- //
- // Generated using `sharpie urho`
- //
- // UrhoString.cs
- //
- // Copyright 2015 Xamarin Inc. All rights reserved.
- using System;
- using System.Runtime.InteropServices;
- using System.Collections.Generic;
- using Urho.Urho2D;
- using Urho.Gui;
- using Urho.Resources;
- using Urho.IO;
- using Urho.Navigation;
- using Urho.Network;
- namespace Urho
- {
- /// <summary>
- /// %String class.
- /// </summary>
- public unsafe partial class UrhoString
- {
- unsafe partial void OnUrhoStringCreated ();
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr UrhoString_String ();
- [Preserve]
- public UrhoString ()
- {
- Runtime.Validate (typeof(UrhoString));
- handle = UrhoString_String ();
- OnUrhoStringCreated ();
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr UrhoString_String0 (string str);
- [Preserve]
- public UrhoString (string str)
- {
- Runtime.Validate (typeof(UrhoString));
- handle = UrhoString_String0 (str);
- OnUrhoStringCreated ();
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr UrhoString_String1 (int value);
- [Preserve]
- public UrhoString (int value)
- {
- Runtime.Validate (typeof(UrhoString));
- handle = UrhoString_String1 (value);
- OnUrhoStringCreated ();
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr UrhoString_String2 (short value);
- [Preserve]
- public UrhoString (short value)
- {
- Runtime.Validate (typeof(UrhoString));
- handle = UrhoString_String2 (value);
- OnUrhoStringCreated ();
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr UrhoString_String3 (System.nint value);
- [Preserve]
- public UrhoString (System.nint value)
- {
- Runtime.Validate (typeof(UrhoString));
- handle = UrhoString_String3 (value);
- OnUrhoStringCreated ();
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr UrhoString_String4 (long value);
- [Preserve]
- public UrhoString (long value)
- {
- Runtime.Validate (typeof(UrhoString));
- handle = UrhoString_String4 (value);
- OnUrhoStringCreated ();
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr UrhoString_String5 (uint value);
- [Preserve]
- public UrhoString (uint value)
- {
- Runtime.Validate (typeof(UrhoString));
- handle = UrhoString_String5 (value);
- OnUrhoStringCreated ();
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr UrhoString_String6 (ushort value);
- [Preserve]
- public UrhoString (ushort value)
- {
- Runtime.Validate (typeof(UrhoString));
- handle = UrhoString_String6 (value);
- OnUrhoStringCreated ();
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr UrhoString_String7 (System.nuint value);
- [Preserve]
- public UrhoString (System.nuint value)
- {
- Runtime.Validate (typeof(UrhoString));
- handle = UrhoString_String7 (value);
- OnUrhoStringCreated ();
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr UrhoString_String8 (ulong value);
- [Preserve]
- public UrhoString (ulong value)
- {
- Runtime.Validate (typeof(UrhoString));
- handle = UrhoString_String8 (value);
- OnUrhoStringCreated ();
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr UrhoString_String9 (float value);
- [Preserve]
- public UrhoString (float value)
- {
- Runtime.Validate (typeof(UrhoString));
- handle = UrhoString_String9 (value);
- OnUrhoStringCreated ();
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr UrhoString_String10 (double value);
- [Preserve]
- public UrhoString (double value)
- {
- Runtime.Validate (typeof(UrhoString));
- handle = UrhoString_String10 (value);
- OnUrhoStringCreated ();
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr UrhoString_String11 (bool value);
- [Preserve]
- public UrhoString (bool value)
- {
- Runtime.Validate (typeof(UrhoString));
- handle = UrhoString_String11 (value);
- OnUrhoStringCreated ();
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void UrhoString_Replace (IntPtr handle, string replaceThis, string replaceWith, bool caseSensitive);
- /// <summary>
- /// Replace all occurrences of a string.
- /// </summary>
- public void Replace (string replaceThis, string replaceWith, bool caseSensitive = true)
- {
- Runtime.ValidateObject (this);
- UrhoString_Replace (handle, replaceThis, replaceWith, caseSensitive);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void UrhoString_Replace12 (IntPtr handle, uint pos, uint length, string replaceWith);
- /// <summary>
- /// Replace a substring.
- /// </summary>
- public void Replace (uint pos, uint length, string replaceWith)
- {
- Runtime.ValidateObject (this);
- UrhoString_Replace12 (handle, pos, length, replaceWith);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr UrhoString_Replaced (IntPtr handle, string replaceThis, string replaceWith, bool caseSensitive);
- /// <summary>
- /// Return a string with all occurrences of a string replaced.
- /// </summary>
- public string Replaced (string replaceThis, string replaceWith, bool caseSensitive = true)
- {
- Runtime.ValidateObject (this);
- return Marshal.PtrToStringAnsi (UrhoString_Replaced (handle, replaceThis, replaceWith, caseSensitive));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void UrhoString_Insert (IntPtr handle, uint pos, string str);
- /// <summary>
- /// Insert a string.
- /// </summary>
- public void Insert (uint pos, string str)
- {
- Runtime.ValidateObject (this);
- UrhoString_Insert (handle, pos, str);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void UrhoString_Erase (IntPtr handle, uint pos, uint length);
- /// <summary>
- /// Erase a substring.
- /// </summary>
- public void Erase (uint pos, uint length = 1)
- {
- Runtime.ValidateObject (this);
- UrhoString_Erase (handle, pos, length);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void UrhoString_Resize (IntPtr handle, uint newLength);
- /// <summary>
- /// Resize the string.
- /// </summary>
- public void Resize (uint newLength)
- {
- Runtime.ValidateObject (this);
- UrhoString_Resize (handle, newLength);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void UrhoString_Reserve (IntPtr handle, uint newCapacity);
- /// <summary>
- /// Set new capacity.
- /// </summary>
- public void Reserve (uint newCapacity)
- {
- Runtime.ValidateObject (this);
- UrhoString_Reserve (handle, newCapacity);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void UrhoString_Compact (IntPtr handle);
- /// <summary>
- /// Reallocate so that no extra memory is used.
- /// </summary>
- public void Compact ()
- {
- Runtime.ValidateObject (this);
- UrhoString_Compact (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void UrhoString_Clear (IntPtr handle);
- /// <summary>
- /// Clear the string.
- /// </summary>
- public void Clear ()
- {
- Runtime.ValidateObject (this);
- UrhoString_Clear (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr UrhoString_Substring (IntPtr handle, uint pos);
- /// <summary>
- /// Return a substring from position to end.
- /// </summary>
- public string Substring (uint pos)
- {
- Runtime.ValidateObject (this);
- return Marshal.PtrToStringAnsi (UrhoString_Substring (handle, pos));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr UrhoString_Substring13 (IntPtr handle, uint pos, uint length);
- /// <summary>
- /// Return a substring with length from position.
- /// </summary>
- public string Substring (uint pos, uint length)
- {
- Runtime.ValidateObject (this);
- return Marshal.PtrToStringAnsi (UrhoString_Substring13 (handle, pos, length));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr UrhoString_Trimmed (IntPtr handle);
- /// <summary>
- /// Return string with whitespace trimmed from the beginning and the end.
- /// </summary>
- public string Trimmed ()
- {
- Runtime.ValidateObject (this);
- return Marshal.PtrToStringAnsi (UrhoString_Trimmed (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr UrhoString_ToUpper (IntPtr handle);
- /// <summary>
- /// Return string in uppercase.
- /// </summary>
- public string ToUpper ()
- {
- Runtime.ValidateObject (this);
- return Marshal.PtrToStringAnsi (UrhoString_ToUpper (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr UrhoString_ToLower (IntPtr handle);
- /// <summary>
- /// Return string in lowercase.
- /// </summary>
- public string ToLower ()
- {
- Runtime.ValidateObject (this);
- return Marshal.PtrToStringAnsi (UrhoString_ToLower (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint UrhoString_Find (IntPtr handle, string str, uint startPos, bool caseSensitive);
- /// <summary>
- /// Return index to the first occurrence of a string, or NPOS if not found.
- /// </summary>
- public uint Find (string str, uint startPos = 0, bool caseSensitive = true)
- {
- Runtime.ValidateObject (this);
- return UrhoString_Find (handle, str, startPos, caseSensitive);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint UrhoString_FindLast (IntPtr handle, string str, uint startPos, bool caseSensitive);
- /// <summary>
- /// Return index to the last occurrence of a string, or NPOS if not found.
- /// </summary>
- public uint FindLast (string str, uint startPos, bool caseSensitive = true)
- {
- Runtime.ValidateObject (this);
- return UrhoString_FindLast (handle, str, startPos, caseSensitive);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool UrhoString_StartsWith (IntPtr handle, string str, bool caseSensitive);
- /// <summary>
- /// Return whether starts with a string.
- /// </summary>
- public bool StartsWith (string str, bool caseSensitive = true)
- {
- Runtime.ValidateObject (this);
- return UrhoString_StartsWith (handle, str, caseSensitive);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool UrhoString_EndsWith (IntPtr handle, string str, bool caseSensitive);
- /// <summary>
- /// Return whether ends with a string.
- /// </summary>
- public bool EndsWith (string str, bool caseSensitive = true)
- {
- Runtime.ValidateObject (this);
- return UrhoString_EndsWith (handle, str, caseSensitive);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint UrhoString_Length (IntPtr handle);
- /// <summary>
- /// Return length.
- /// </summary>
- public uint Length ()
- {
- Runtime.ValidateObject (this);
- return UrhoString_Length (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint UrhoString_Capacity (IntPtr handle);
- /// <summary>
- /// Return buffer capacity.
- /// </summary>
- public uint Capacity ()
- {
- Runtime.ValidateObject (this);
- return UrhoString_Capacity (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool UrhoString_Empty (IntPtr handle);
- /// <summary>
- /// Return whether the string is empty.
- /// </summary>
- public bool Empty ()
- {
- Runtime.ValidateObject (this);
- return UrhoString_Empty (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern int UrhoString_Compare (IntPtr handle, string str, bool caseSensitive);
- /// <summary>
- /// Return comparison result with a string.
- /// </summary>
- public int Compare (string str, bool caseSensitive = true)
- {
- Runtime.ValidateObject (this);
- return UrhoString_Compare (handle, str, caseSensitive);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool UrhoString_Contains (IntPtr handle, string str, bool caseSensitive);
- /// <summary>
- /// Return whether contains a specific occurrence of a string.
- /// </summary>
- public bool Contains (string str, bool caseSensitive = true)
- {
- Runtime.ValidateObject (this);
- return UrhoString_Contains (handle, str, caseSensitive);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint UrhoString_LengthUTF8 (IntPtr handle);
- /// <summary>
- /// Calculate number of characters in UTF8 content.
- /// </summary>
- public uint LengthUTF8 ()
- {
- Runtime.ValidateObject (this);
- return UrhoString_LengthUTF8 (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint UrhoString_ByteOffsetUTF8 (IntPtr handle, uint index);
- /// <summary>
- /// Return byte offset to char in UTF8 content.
- /// </summary>
- public uint ByteOffsetUTF8 (uint index)
- {
- Runtime.ValidateObject (this);
- return UrhoString_ByteOffsetUTF8 (handle, index);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint UrhoString_AtUTF8 (IntPtr handle, uint index);
- /// <summary>
- /// Return Unicode character at index from UTF8 content.
- /// </summary>
- public uint AtUTF8 (uint index)
- {
- Runtime.ValidateObject (this);
- return UrhoString_AtUTF8 (handle, index);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void UrhoString_ReplaceUTF8 (IntPtr handle, uint index, uint unicodeChar);
- /// <summary>
- /// Replace Unicode character at index from UTF8 content.
- /// </summary>
- public void ReplaceUTF8 (uint index, uint unicodeChar)
- {
- Runtime.ValidateObject (this);
- UrhoString_ReplaceUTF8 (handle, index, unicodeChar);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr UrhoString_SubstringUTF8 (IntPtr handle, uint pos);
- /// <summary>
- /// Return a UTF8 substring from position to end.
- /// </summary>
- public string SubstringUTF8 (uint pos)
- {
- Runtime.ValidateObject (this);
- return Marshal.PtrToStringAnsi (UrhoString_SubstringUTF8 (handle, pos));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr UrhoString_SubstringUTF814 (IntPtr handle, uint pos, uint length);
- /// <summary>
- /// Return a UTF8 substring with length from position.
- /// </summary>
- public string SubstringUTF8 (uint pos, uint length)
- {
- Runtime.ValidateObject (this);
- return Marshal.PtrToStringAnsi (UrhoString_SubstringUTF814 (handle, pos, length));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint UrhoString_ToHash (IntPtr handle);
- /// <summary>
- /// Return hash value for HashSet
- /// &
- /// HashMap.
- /// </summary>
- public uint ToHash ()
- {
- Runtime.ValidateObject (this);
- return UrhoString_ToHash (handle);
- }
- }
- }
|