Files
acceptance-tests
data
debian
docs
HtmlAgilityPack
deploy
sources
mono-api-assembly.html
mono-api-class.html
mono-api-counters.html
mono-api-debug.html
mono-api-domains.html
mono-api-dynamic-codegen.html
mono-api-embedding.html
mono-api-exc.html
mono-api-gc.html
mono-api-gchandle.html
mono-api-image.html
mono-api-internal.html
mono-api-jit.html
mono-api-jitinternal.html
mono-api-metadata.html
mono-api-methods.html
mono-api-object.html
mono-api-profiler.html
mono-api-reflection.html
mono-api-security.html
mono-api-string.html
mono-api-threads.html
mono-api-type.html
mono-api-types.html
mono-api-unsorted.html
mono-api-utils.html
mono-api-vm.html
mono-api-wapi.html
svgs
Makefile.am
Makefile.in
README
TODO
abc-removal.txt
api-style.css
check-coverage
check-exports
convert.cs
docs.make
embedded-api
exdoc
file-share-modes
gc-issues
gc-variables-in-c
glossary.txt
ignore
internal-calls
ir-desc
jit-imt
jit-thoughts
jit-trampolines
mini-doc.txt
mono-api-metadata.html
mono-file-formats.config
mono-file-formats.source
mono-tools.config
mono-tools.source
monoapi.source
object-layout
precise-gc
produce-lists
remoting
ssapre.txt
stack-overflow.txt
threading
toc.xml
unmanaged-calls
external
ikvm-native
libgc
llvm
m4
man
mcs
mk
mono
msvc
po
runtime
samples
scripts
support
tools
COPYING.LIB
LICENSE
Makefile.am
Makefile.in
NEWS
README.md
acinclude.m4
aclocal.m4
autogen.sh
code_of_conduct.md
compile
config.guess
config.h.in
config.rpath
config.sub
configure.REMOVED.git-id
configure.ac.REMOVED.git-id
depcomp
install-sh
ltmain.sh.REMOVED.git-id
missing
mkinstalldirs
mono-uninstalled.pc.in
test-driver
winconfig.h
linux-packaging-mono/docs/sources/mono-api-string.html
Xamarin Public Jenkins (auto-signing) e79aa3c0ed Imported Upstream version 4.6.0.125
Former-commit-id: a2155e9bd80020e49e72e86c44da02a8ac0e57a4
2016-08-03 10:59:49 +00:00

62 lines
2.0 KiB
HTML

<h2>Strings</h2>
<p>Strings representation inside the Mono runtime.
<h3>Synopsis</h3>
<div class="mapi-header">
#include &lt;metadata/object.h&gt;
typedef struct {
MonoObject object;
gint32 length;
gunichar2 chars [0];
} MonoString;
@API_IDX@
</div>
<p>All of the operations on strings are done on pointers to
`MonoString` objects, like this:
<div class="mapi-code">
MonoString *hello = mono_string_new (mono_domain_get (), "hello, world");
</div>
<p>Strings are bound to a particular application domain, which
is why it is necessary to pass a MonoDomain argument as the
first parameter to all the constructor functions.
<p>Typically, you want to create the strings on the current
application domain, so a call to <tt>mono_domain_get()</tt> is
sufficient.
<h3>Constructors</h3>
<h4><a name="api:mono_string_new">mono_string_new</a></h4>
<h4><a name="api:mono_string_new_len">mono_string_new_len</a></h4>
<h4><a name="api:mono_string_new_size">mono_string_new_size</a></h4>
<h4><a name="api:mono_string_new_utf16">mono_string_new_utf16</a></h4>
<h4><a name="api:mono_string_new_utf32">mono_string_new_utf32</a></h4>
<h4><a name="api:mono_string_from_utf16">mono_string_from_utf16</a></h4>
<h4><a name="api:mono_string_from_utf32">mono_string_from_utf32</a></h4>
<h3>Conversions</h3>
<h4><a name="api:mono_string_to_utf16">mono_string_to_utf16</a></h4>
<h4><a name="api:mono_string_to_utf8">mono_string_to_utf8</a></h4>
<h4><a name="api:mono_string_to_utf8_checked">mono_string_to_utf8_checked</a></h4>
<h4><a name="api:mono_string_to_utf32">mono_string_to_utf32</a></h4>
<h3>Methods</h3>
<h4><a name="api:mono_string_equal">mono_string_equal</a></h4>
<h4><a name="api:mono_string_hash">mono_string_hash</a></h4>
<h4><a name="api:mono_string_intern">mono_string_intern</a></h4>
<h4><a name="api:mono_string_is_interned">mono_string_is_interned</a></h4>
<h4><a name="api:mono_string_new_wrapper">mono_string_new_wrapper</a></h4>
<h4><a name="api:mono_string_chars">mono_string_chars</a></h4>
<h4><a name="api:mono_string_length">mono_string_length</a></h4>