סקר מחקר: נשמח לשמוע על החוויה שלך עם Blockly
לפתיחת הסקר
blockly > CodeGenerator > prefixLines
שיטת CodeGenerator.prefixLines()
מוסיפים תחילית משותפת בכל שורת קוד. מיועדת לכניסות פסקה של קוד או להוספת סמני תגובה.
Signature:
prefixLines(text: string, prefix: string): string;
פרמטרים
פרמטר |
סוג |
תיאור |
טקסט |
מחרוזת |
שורות הקוד. |
תחילית |
מחרוזת |
הקידומת המשותפת. |
החזרות:
מחרוזת
שורות הקוד המקדימות.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2024-08-21 (שעון UTC).
[null,null,["עדכון אחרון: 2024-08-21 (שעון UTC)."],[[["The `CodeGenerator.prefixLines()` method adds a specified prefix to each line of a given text, typically for indentation or adding comment markers."],["It accepts the text to be modified and the prefix as input, and returns the modified text."],["This method is useful for formatting generated code blocks within the Blockly framework."]]],[]]