Random String Utility

버전 1.0.0.0 (1.68 KB) 작성자: Dan Couture
Generate a random string. Specify length and type of characters.
다운로드 수: 343
업데이트 날짜: 2012/8/20

라이선스 보기

편집자 메모: This file was selected as MATLAB Central Pick of the Week

RANDOM_STRING - Generate a random string

When a name is needed but none is provided, never fear
RANDOM_STRING is here! As configured returns a random
set of upper case letters (default of 10 long)

Input:
@length
value - Length of the random string to generate
default - 10
type - int
@type
value - Type of characters to include.
1 = A-Z, 2 = a-z, 3=letters/#'s/special chars
default - 1
type - int

Return:
@str
value - The generated random string
type - str

Usage:
my_str = random_string(); % 10 upper case letters
my_str = random_string(15); % 5 upper case letters
my_str = random_string(8, 3); % 8 ascii characters

인용 양식

Dan Couture (2024). Random String Utility (https://www.mathworks.com/matlabcentral/fileexchange/37853-random-string-utility), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2007a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Characters and Strings에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0.0