연구 설문조사: Blockly 사용 경험을 알려주세요
설문조사 시작
차단 > 변수 > generateUniqueNameFromOptions
Variables.generateUniqueNameFromOptions() 함수
usedNames 배열에 없는 고유한 이름을 반환합니다. 그러면 a - z 범위의 단일 문자 이름이 생성됩니다 (l 건너뛰기). startChar에 전달된 문자로 시작합니다.
서명:
export declare function generateUniqueNameFromOptions(startChar: string, usedNames: string[]): string;
매개변수
매개변수 |
유형 |
설명 |
startChar |
문자열 |
검색을 시작할 문자입니다. |
usedNames |
문자열[] |
사용된 모든 이름의 목록입니다. |
반환:
문자열
usedNames 배열에 없는 고유한 이름입니다.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2024-08-22(UTC)
[null,null,["최종 업데이트: 2024-08-22(UTC)"],[[["The `generateUniqueNameFromOptions` function produces a unique name not found in a provided list, prioritizing single letters (a-z, excluding l)."],["This function begins its search with a specified starting character and iterates through potential names until an unused one is identified."],["The function accepts a starting character and an array of used names as input, returning a unique string representing the new name."]]],[]]