好词典

wrapper

UK /ˈræpə/US /ˈræpər/

词源

源自中古英语 wrappen(包裹),可能来自低地德语 wrappen(卷起,包裹)。

noun

❶ 包裹物品的材料或外层覆盖物,通常指纸、塑料或布料等,用于保护或装饰物品。

“She carefully removed the wrapper from the chocolate bar.”

(她小心地剥开巧克力棒的包装纸。)

“The gift came in a shiny gold wrapper.”

(礼物用闪亮的金色包装纸包裹着。)

❶ 在编程中,指封装其他代码或功能的代码层,用于简化或扩展原有功能。

“He wrote a Python wrapper for the C library.”

(他为这个C语言库写了一个Python封装层。)

“The API wrapper makes it easier to use the service.”

(这个API封装让服务使用起来更简单。)

同义词:covering, envelope, sheath, jacket, encasement

常见短语

wrapper function — 编程术语,指调用其他函数并可能添加额外功能的函数。

“The wrapper function adds logging before calling the main function.”

(这个包装函数在调用主函数前添加了日志记录功能。)

candy wrapper — 特指包裹糖果的纸或塑料包装。

“The floor was littered with candy wrappers after the party.”

(派对结束后地板上到处都是糖果包装纸。)