첨부 실행 코드는 나눔고딕코딩 폰트를 사용합니다.
------------------------------------------------------------------------------------------------------------------------------------------------------
728x90
728x170

■ Chars 구조체의 next 메소드를 사용해 다음 문자를 구하는 방법을 보여준다.

 

▶ 예제 코드 (RS)

use std::str;

let source_string : String = String::from("ABCDEFGHIJKLMNOPQRSTUVWXYZ".to_string());

let mut source_chars: str::Chars = source_string.chars();

while let Some(source_character) = source_chars.next()
{
    println!("{}", source_character);
}
728x90
그리드형(광고전용)
Posted by icodebroker
,