Replies: 1 comment 5 replies
-
I think the English is using the term "buffer" here to mean "a block of
bytes in memory". To answer your question, "is String type is buffer", is
difficult -- String's type is String! But in some ways it works like a
buffer, in the sense that it owns a block of bytes in memory.
As for "standard heap-allocated", "standard" means it's used very widely in
Rust code. This word could probably apply to everything in `std`!
"heap-allocated" is differentiating `String` from `&'static str` (constant
strings embedded in the binary), which are not stored on the heap.
I hope that helps?
Dustin
…On Thu, Apr 25, 2024 at 4:20 PM Enes Aydın ***@***.***> wrote:
Hi, I am trying to translate this course into Turkish. Even if I
understand what the two sentences about strings mean in English, I seem to
be missing something (because my English is not very good).
Sentences:
"String is an owned, heap-allocated buffer of UTF-8 bytes."
"String is the standard heap-allocated growable UTF-8 string buffer"
What I understand is that:
"String is an owned" -> "String type has ownership over the contents of
the string."
"String is an heap-allocated buffer of UTF-8 bytes." -> "String contains
UTF-8 encoded bytes and String has heap allocated buffer"
"String is the standard heap-allocated growable UTF-8 string buffer" -> "I
understand a few things, but the sentence seems interesting."
What I don't understand is that:
"String is heap-allocated buffer of UTF-8 bytes." -> is String type is
buffer?
"String is the standard heap-allocated growable UTF-8 string buffer" ->
What is the "standad heap-allocated" ..?
Sorry my English,
—
Reply to this email directly, view it on GitHub
<#2028>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAHAAIDDVVNN2XDDM2VQDDY7FQQXAVCNFSM6AAAAABGZRZLVOVHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZWGU3DCMJZGU>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I am trying to translate this course into Turkish. Even if I understand what the two sentences about strings mean in English, I seem to be missing something (because my English is not very good).
Sentences:
"String is an owned, heap-allocated buffer of UTF-8 bytes."
"String is the standard heap-allocated growable UTF-8 string buffer"
What I understand is that:
"String is an owned" -> "String type has ownership over the contents of the string."
"String is an heap-allocated buffer of UTF-8 bytes." -> "String contains UTF-8 encoded bytes and String has heap allocated buffer"
"String is the standard heap-allocated growable UTF-8 string buffer" -> "I understand a few things, but the sentence seems interesting."
What I don't understand is that:
"String is heap-allocated buffer of UTF-8 bytes." -> is String type is buffer?
"String is the standard heap-allocated growable UTF-8 string buffer" -> What is the "standad heap-allocated ..." ? I wonder if a comma is needed in some places?
Sorry my English,
Beta Was this translation helpful? Give feedback.
All reactions