문자열,string

Def. (일반적으로)
string: 시퀀스,sequence of 심벌,symbol(또는 문자,character).
(정의가 저자에 따라 finite_sequence인 경우도 있고 그냥 sequence인 경우도 있는데... TBD)

(Cmp. 알파벳,alphabet: a finite set of symbols.)


일단 현재는 PL의 character_string 얘기임. 타입,type의 일종인.
string은 대개 '문자열'로 번역되지만, string 단어 자체에 문자,character라는 뜻이 필연적으로 들어 있지 않다. 수열,sequence이 꼭 수,number의 sequence가 아닌것과 마찬가지인, 계수,coefficient가 꼭 수가 아닌 것과 마찬가지인 번역 문제.
(개념 자체는 sequence와 유사한데 mklink. - 수열,sequence)
중립적인 번역은 스트링,string인가?
character string이 아닌 다른 string을 다룬다면, pagename.. 페이지 분리는 character_string을 분리할까 아님 스트링,string을 분리할까?
character_string : abbr. charstring { WtEn:charstring }

비슷? linear 선형,linear

rope - rope
sequence - 시퀀스,sequence 수열,sequence
튜플,tuple
list - 리스트,list 목록,list?
벡터,vector ... ex. 해밍_거리,Hamming_distance는 '두 문자열이나 벡터에 대해' 정의됨.
...

Sub:
형식_문자열,format_string
자바_문자열,Java_string
empty_string = null_string =,empty_string empty_string | =,null_string null_string
{
번역?
빈문자열
공문자열 - empty set은 공집합,empty_set
널문자열??

자주 쓰이는 기호는 ε,
λ 도 쓰던거같던데 맞나? - Yes, 대문자 Λ도 씀. Ggl:empty string symbol

리터럴,literal "", ''

아마도 aka null_string ? 널,null? - Yes.[1]







부분문자열 서브스트링 substring =,substring . substring
{
부문자열 ?






// by PLs, PL syntax 리터럴,literal
multiline string
multiline_string
{
multiline string


...
"multiline string"
Naver:multiline string
Ggl:multiline string

}

히어닥 히어독 heredoc here_document
{
PHP의 경우
$paragraph = <<<DELIM
This is a string that
Will be interpreted exactly
As it is written in the
variable assignment.
DELIM;



https://en.wiktionary.org/wiki/heredoc
(here document의 줄임말이라는 내용, 볼필요x)
https://en.wiktionary.org/wiki/here_document
"(computing) A block of text included in the source code of a computer program in such a way that it is treated as a single string literal with line breaks etc. as written." (2023-11-19)
see also docstring
... Google:heredoc
}

docstring =,docstring =,docstring . docstring
{

WtEn:docstring = https://en.wiktionary.org/wiki/docstring
"A string literal specified in source code that is used, like a comment, to document a specific segment of code, but remains available at run-time." (2023-11-19)
}

finite_string =,finite_string =,finite_string . finite_string
{
finite string


cmp: finite sequence finite_sequence , word ( 형식체계,formal_system에선 단어,word와 같은 뜻일 때가 있다. See [https]https://proofwiki.org/wiki/Definition:Word_(Formal_Systems) )


"finite string infinite string definition"
Ggl:finite string infinite string definition
}

infinite_string =,infinite_string =,infinite_string . infinite_string
{
rel. 스트림,stream?


balanced_string =,balanced_string . balanced_string
{
balanced string
균형잡힌 문자열 ?
균형문자열 ?






이건 NP-Hard 문제,problem 중 하나.
WpEn:Closest_string
= https://en.wikipedia.org/wiki/Closest_string
"is an NP-hard computational problem,1 which tries to find the geometrical center of a set of input strings."

}
이건 두 문자열의 similarity (유사도,similarity - VG:유사도,similarity, 유사성, ... )의 측도,measure (유사성측도)
거리,distance에 비유 - ex. 해밍_거리,Hamming_distance - VG:해밍_거리,Hamming_distance





(대충) 여러 개의 문자,character들로 이루어져 있으며
메모리,memory에는 거의 항상 연속적으로 저장되는 것 같고 (linked_list 와 다른 점)
길이,length(string_length)/메모리 layout 관련 두 가지 방법
QQQ 널 문자로 끝나는 문자열 null-terminated string =ASCIIZ?



to string

to_string
PL마다 다르겠지만 뭔가를(객체,object 변수,variable 등을)
콘솔,console출력,output하기 위해선
일단 문자열로 변환해야 한다.
(misc, del ok)
oop언어의 메소드,method 이름은
자바,Java의 경우 .toString()
CSharp의 경우 .ToString()
.NET : System.Object.ToString method
Object.ToString 메서드 (System) | Microsoft Learn
https://learn.microsoft.com/ko-kr/dotnet/api/system.object.tostring?view=net-8.0#system-object-tostring
루비,Ruby의 경우 .to_s

이건 직렬화,serialization marshalling과 어느 정도 관련이 있는데... mkl.

문자열 리터럴 string literal


문자열 리터럴,literal
대개 좌우에 따옴표.
중간에 특수한 문자를 소스코드에서 표현할 수 있도록 escape_sequence 가 있고. (C의 경우 https://en.cppreference.com/w/c/language/escape C++의 경우 https://en.cppreference.com/w/cpp/language/escape )
기타 여러 줄을 편하게 표현하기 위한 multiline string 문법이 있기도 하다 (QQQ 이건 heredoc 과 어떤 관계?)


여러 언어의 string literal
https://rosettacode.org/wiki/Literals/String

string operations


특정 위치 인덱스,index문자,character 뽑아내기

자르기 cut? split? slice ? / 분리하기 / 쪼개기 / ....
이건 어떤건 delimiter { 구분문자? 문자,character ? } 를 기준으로 하고
slice는 인덱스,index를 기준으로 하고 ...

concatenation
{
번역을 뭐로 할지 TBD. 붙이기? 합치기? 연결? 연결하기?(이건 connect에 더 가까운?) merge? adding ? concatenation? string_concatenation?
append와 관계 tbw


split의 반대인 join() 연산도 있고 (합칠 때 사이사이마다 뭔가를 넣어주는) - 이게 concatenation인지?

숫자를 담은 문자열을 숫자로 변환하기 ex. "123"을 123으로 변환하기
Ruby의 to_i

치환 substitution

문자열비교,string_comparison =,string_comparison 문자열비교 string_comparison
문자열비교연산,string_comparison_operation ?
{


cf.
StringComparison Enum (System) | Microsoft Learn
https://learn.microsoft.com/ko-kr/dotnet/api/system.stringcomparison?view=net-8.0





by PLs



파스칼,Pascal의 경우
{
문자,character에는 Char / WideChar

PChar
String
String[length]
ShortString - 길이 255?
AnsiString - 길이제한 x?
WideString - 유니코드 문자열?
암튼 TBW

}



Compare: stream
MKLINK
자료구조,data_structure 중에서 rope .... pagename? 밧줄,rope? 로프,rope?
{
aka cord (wpen)

https://en.wiktionary.org/wiki/rope#Noun
(7.)
" A data structure resembling a string, using a concatenation tree in which each leaf represents a character."
문자열,string을 닮은 자료구조. concatenation_tree를 사용, 각 leaf는 문자,character를 표현함.
concatenation_tree - Ggl:concatenation tree

WpEn:Rope_(data_structure)
}

bit_string =,bit_string =,bit_string . bit_string
bitmask =,bitmask =,bitmask . bitmask
bit_mask =,bit_mask =,bit_mask . bit_mask // is_a 마스크,mask
bit_map =,bit_map =,bit_map . bit_map // image를 표현하는 붙여쓰는 비트맵,bitmap과... 유사점/차이점?
bit_vector =,bit_vector =,bit_vector . bit_vector // is_a 벡터,vector
{
이건 도저히 비트문자열 로 번역할 수 없음. ....너무 어색.
비트열?
비트배열?


https://en.wikipedia.org/wiki/Bit_string
redir to (2023-11-26)
https://en.wikipedia.org/wiki/Bit_array
앞 두 문장:
{"A bit array
(also known as bitmask, bit map, bit set, bit string, or bit vector)
is an array data structure // 배열,array에 속함.
that compactly stores bits. // 문맥 상 누구나 이해하지만, 보다 정확하게 표현하자면 bits보다 boolean values가 낫지 않을까? 당근, boolean들을 저장할 때 byte/int 단위로 저장하는 것보다 훨씬 공간을 절약.
It can be used to implement a simple set data structure."} // 간단한 집합,set(자료구조,data_structure) 구현에 쓸 수 있음.

약간관련?? mkl or del.
원핫,one-hot
원콜드,one-cold
원샷,one-shot

}


영단어 스트링,string
CS에선 문자열,string 이거고
Physics에선 끈,string
...



.NET : System.String 클래스,class
{
String 클래스 (System) | Microsoft Learn
https://learn.microsoft.com/ko-kr/dotnet/api/system.string?view=net-8.0
Ssytem.Char의 순차적 collection.
}

Twins:
https://foldoc.org/string (character_string)
https://foldoc.org/bit string (bit_string)