let t = s.char_indices().nth(5).map_or(s, |(i, _)| &s[..i]);
let t = s.chars().take(5).collect::<String>();
T : String := S (1 .. 5);
(def t (apply str (take 5 s)))
IDENTIFICATION DIVISION.
PROGRAM-ID. prefix 5.
PROCEDURE DIVISION.
MOVE s(1:5) TO t
STOP RUN.
string t = s.Substring(0, 5);
var t = s.substring(0, 5);
t = String.slice(s, 0, 5)
[A, B, C, D, E | _] = S,
T = [A, B, C, D, E].
T = string:slice(S, 0, 5).
character(len=5) :: t
t = s(1:5)
t := s
r := []rune(s)
if len(r) > 5 {
t = string(r[:5])
}
i := 0
count := 0
for i = range s {
if count >= 5 {
break
}
count++
}
t := s
if count >= 5 {
t = s[:i]
}
t :: T.Text
t = T.take 5 s
let t = s.substring(0,5);
String t = s.substring(0,5);
(setf *t* (subseq s 0 5))
NSString *t=[s substringToIndex:5];
$t = mb_substr($s, 0, 5, 'UTF-8');