blockly > الإجراءات > isNameUsed
الدالة Procedures.isNameUsed()
يمكنك الرجوع إذا كان الاسم المقدم هو اسم إجراء من قبل.
Signature:
export declare function isNameUsed(name: string, workspace: Workspace, opt_exclude?: Block): boolean;
المعلمات
المعلمة |
النوع |
الوصف |
الاسم |
سلسلة |
الاسم محلّ المشكلة. |
مساحة العمل |
مساحة العمل |
مساحة العمل للبحث عن التصادمات. |
opt_exclude |
حظر |
(اختياري) حظر اختياري لاستبعاده من المقارنات (لا يريد أحد المستخدمين التعارض مع نفسه). |
المرتجعات:
منطقي
True في حالة استخدام الاسم، وبخلاف ذلك يتم عرض false.
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2024-08-21 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2024-08-21 (حسب التوقيت العالمي المتفَّق عليه)"],[[["Determines if a given name is already in use as a procedure name within a specific workspace."],["Accepts the name to check, the workspace to search within, and an optional block to exclude from the comparison."],["Returns `true` if the name is already assigned to a procedure, `false` otherwise."]]],["The `Procedures.isNameUsed()` function checks if a given name is already in use as a procedure name within a specified workspace. It accepts the name (a string), the workspace to be checked, and optionally, a block to exclude from the comparison. The function returns `true` if the name is in use and `false` if the name is free. The function is useful to check name collision.\n"]]